Open jaysylvester opened 2 years ago
Model cache settings tend to follow this pattern:
let scope = 'discussion-' + discussion.id let key = 'info'
This makes clearing all discussion caches difficult because it requires iterating over the set:
for ( let i = 0; i < discussions.rows.length; i++ ) { app.cache.clear({ scope: 'discussion-' + discussions.rows[i].id }) }
Cache scopes and keys such as the following would make it easier to clear groups of cache items:
let scope = 'discussion' let key = 'discussion-' + discussion.id + '-info' app.cache.clear({ scope: 'discussion' }) // Clear all discussion caches
Model cache settings tend to follow this pattern:
This makes clearing all discussion caches difficult because it requires iterating over the set:
Cache scopes and keys such as the following would make it easier to clear groups of cache items: