minor cache fix...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2018-04-04 00:01:09 +03:00
parent da5048b971
commit c3a4d9adf4
2 changed files with 22 additions and 2 deletions

View File

@ -201,9 +201,14 @@ var CollectionActions = actions.Actions({
// XXX revise doc... // XXX revise doc...
// XXX this is almost the same as .store_handlers... // XXX this is almost the same as .store_handlers...
get collection_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 that = this
var handlers = {} handlers = {}
handlers['data'] = null handlers['data'] = null
this.actions.forEach(function(action){ this.actions.forEach(function(action){

View File

@ -831,10 +831,25 @@ module.Cache = ImageGridFeatures.Feature({
this.preCache() this.preCache()
: false : 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... // Timers...