public class SessionDesktopCacheProvider implements DesktopCacheProvider {
private WebApp _wapp;
//-- DesktopCacheProvider --//
public DesktopCache getDesktopCache(Session sess) {
final SessionCtrl sessCtrl = (SessionCtrl)sess;
DesktopCache dc = sessCtrl.getDesktopCache();
if (dc == null) {
synchronized (this) {
dc = sessCtrl.getDesktopCache();
if (dc == null) {
dc = new SimpleDesktopCache(_wapp.getConfiguration());
sessCtrl.setDesktopCache(dc);
}
}
}
return dc;
}