diff --git a/src/helma/framework/core/ApplicationBean.java b/src/helma/framework/core/ApplicationBean.java index 599e4c46..79826957 100644 --- a/src/helma/framework/core/ApplicationBean.java +++ b/src/helma/framework/core/ApplicationBean.java @@ -114,6 +114,10 @@ public class ApplicationBean implements Serializable { // getter methods for readonly properties of this application + public int getcacheusage () { + return app.nmgr.countCacheEntries (); + } + public INode getdata() { return app.getCacheNode (); } diff --git a/src/helma/objectmodel/db/NodeManager.java b/src/helma/objectmodel/db/NodeManager.java index 48029c43..874c79d1 100644 --- a/src/helma/objectmodel/db/NodeManager.java +++ b/src/helma/objectmodel/db/NodeManager.java @@ -1160,6 +1160,13 @@ public final class NodeManager { return cache.getEntryArray (); } + /** + * Get the number of elements in the object cache + */ + public int countCacheEntries () { + return cache.size (); + } + /** * Clear the object cache, causing all objects to be recreated. */