From 6ae2db92ff24bd08e7478e02c3dc04aee4cd058e Mon Sep 17 00:00:00 2001 From: hns Date: Mon, 26 Nov 2001 17:27:07 +0000 Subject: [PATCH] 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. --- src/helma/framework/core/User.java | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/helma/framework/core/User.java b/src/helma/framework/core/User.java index af0fd927..138744cb 100644 --- a/src/helma/framework/core/User.java +++ b/src/helma/framework/core/User.java @@ -41,12 +41,12 @@ public class User implements Serializable { public User (String sid, Application app) { this.uid = null; this.nhandle = null; - this.app = app; - setNode (null); - umap = app.getDbMapping ("user"); + this.app = app; + setNode (null); + umap = app.getDbMapping ("user"); cache = new TransientNode ("[session cache]"); - cache.setPrototype ("user"); - cache.setDbMapping (umap); + // cache.setPrototype ("user"); + // cache.setDbMapping (umap); sessionID = sid; onSince = System.currentTimeMillis (); lastTouched = onSince; @@ -121,5 +121,12 @@ public class User implements Serializable { 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]"); + } }