From c3a4d9adf40447a93e2e33ef1756b039feee6fa6 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Wed, 4 Apr 2018 00:01:09 +0300 Subject: [PATCH] minor cache fix... Signed-off-by: Alex A. Naanou --- ui (gen4)/features/collections.js | 9 +++++++-- ui (gen4)/features/core.js | 15 +++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/ui (gen4)/features/collections.js b/ui (gen4)/features/collections.js index 0476ba68..0e870960 100755 --- a/ui (gen4)/features/collections.js +++ b/ui (gen4)/features/collections.js @@ -201,9 +201,14 @@ var CollectionActions = actions.Actions({ // XXX revise doc... // XXX this is almost the same as .store_handlers... get collection_handlers(){ - return this.cache('collection_handlers', function(){ + return this.cache('collection_handlers', function(handlers){ + // cached value... + if(handlers){ + return Object.assign({}, handlers) + } + var that = this - var handlers = {} + handlers = {} handlers['data'] = null this.actions.forEach(function(action){ diff --git a/ui (gen4)/features/core.js b/ui (gen4)/features/core.js index 75515c71..bc61a47d 100755 --- a/ui (gen4)/features/core.js +++ b/ui (gen4)/features/core.js @@ -831,10 +831,25 @@ module.Cache = ImageGridFeatures.Feature({ this.preCache() : false }], + + /*/ XXX clear cache when feature/action topology changes... + [[ + 'inlineMixin', + 'inlineMixout', + + // XXX not sure about this... + 'mixout', + ], + function(){ + // XXX should this trigger a recache??? + this.clearCache() + }], + //*/ ], }) + //--------------------------------------------------------------------- // Timers...