From 5c3374fca58bcca520a16d7ec2630c5b3a3fe925 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Tue, 10 Apr 2018 17:05:59 +0300 Subject: [PATCH] wrapping action caching in a set of actions, still not done... Signed-off-by: Alex A. Naanou --- ui (gen4)/features/core.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ui (gen4)/features/core.js b/ui (gen4)/features/core.js index 3fa04ae1..7f401712 100755 --- a/ui (gen4)/features/core.js +++ b/ui (gen4)/features/core.js @@ -702,6 +702,8 @@ var CacheActions = actions.Actions({ // NOTE: progress will only be displayed if .showProgress(..) // action is available... 'pre-cache-progress': 3000, + + // XXX handler cache.. }, // Cache utility method... @@ -807,6 +809,15 @@ var CacheActions = actions.Actions({ this .clearCache() .preCache(t) }], + + + toggleHandlerCache: ['System/Action handler cache', + makeConfigToggler('action-handler-cache', + ['off', 'on']/*, + function(state){}*/)], + resetHanlerCache: ['System/Reset action handler cache', + function(){ + delete this.__handler_cache }], }) var Cache = @@ -831,6 +842,11 @@ module.Cache = ImageGridFeatures.Feature({ this.preCache() : false }], + ['start', + function(){ + // XXX this breaks loading... + //this.toggleHandlerCache(this.config['action-handler-cache'] || 'on') + }], /*/ XXX clear cache when feature/action topology changes... [[