The user cache node isn't set to the user prototype and
dbmapping anymore (let's see if this has any unwanted effects). Added clearCache() method to reset the cache of the user object.
This commit is contained in:
parent
782bf86ba2
commit
6ae2db92ff
1 changed files with 12 additions and 5 deletions
|
@ -45,8 +45,8 @@ public class User implements Serializable {
|
||||||
setNode (null);
|
setNode (null);
|
||||||
umap = app.getDbMapping ("user");
|
umap = app.getDbMapping ("user");
|
||||||
cache = new TransientNode ("[session cache]");
|
cache = new TransientNode ("[session cache]");
|
||||||
cache.setPrototype ("user");
|
// cache.setPrototype ("user");
|
||||||
cache.setDbMapping (umap);
|
// cache.setDbMapping (umap);
|
||||||
sessionID = sid;
|
sessionID = sid;
|
||||||
onSince = System.currentTimeMillis ();
|
onSince = System.currentTimeMillis ();
|
||||||
lastTouched = onSince;
|
lastTouched = onSince;
|
||||||
|
@ -121,5 +121,12 @@ public class User implements Serializable {
|
||||||
return cache;
|
return cache;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reset the session cache node, clearing all properties.
|
||||||
|
* This is done by recreating the cache node object.
|
||||||
|
*/
|
||||||
|
public void clearCache () {
|
||||||
|
cache = new TransientNode ("[session cache]");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue