diff --git a/src/helma/scripting/fesi/ESAppNode.java b/src/helma/scripting/fesi/ESAppNode.java index 1b3e15f1..f31f28ec 100644 --- a/src/helma/scripting/fesi/ESAppNode.java +++ b/src/helma/scripting/fesi/ESAppNode.java @@ -31,6 +31,7 @@ public class ESAppNode extends ESNode { putHiddenProperty("getActiveThreads", new AppCountActiveEvaluators ("getActiveThreads", evaluator, fp)); putHiddenProperty("getMaxActiveThreads", new AppCountMaxActiveEvaluators ("getMaxActiveThreads", evaluator, fp)); putHiddenProperty("setMaxThreads", new AppSetNumberOfEvaluators ("setMaxThreads", evaluator, fp)); + putHiddenProperty("clearCache", new AppClearCache ("clearCache", evaluator, fp)); } /** @@ -129,6 +130,16 @@ public class ESAppNode extends ESNode { } } + class AppClearCache extends BuiltinFunctionObject { + AppClearCache (String name, Evaluator evaluator, FunctionPrototype fp) { + super (fp, evaluator, name, 1); + } + public ESValue callFunction (ESObject thisObject, ESValue[] arguments) throws EcmaScriptException { + app.clearCache (); + return ESBoolean.makeBoolean (true); + } + } + public String toString () { return ("AppNode "+node.getElementName ());