Closed minagerges closed 9 years ago
Ideally yes, but I would rather to suggest people to clear the cache manually after changing things.
Why?
MODX clears everything under the particular context, and that makes site slower because it has to rebuild ALL caches from scratch.
So, clearing it only when updating and needed, manually.
Hmm... may be I should add some "Clear Context Cache" buttons under the contexts' names on grid for easy access.
My 2 cents on it. By default when changing a context setting modx clears the whole cache. So if it is clearing only the context setting cache it is the right thing to do. Further more if you want to give users freedom of choice which is great, it's better to create a setting value to disable context settings cache refresh. And keep in mind that if cache is not clear the settings change is not effective.
Kind regards, Mina Gerges
Sent from mobile device, apolgies for any mistyping. On Jul 26, 2015 5:54 PM, "rico" notifications@github.com wrote:
Ideally yes, but I would rather to suggest people to clear the cache manually after changing things.
Why?
- If it's a new setting (we have a "Create Setting" button now), it's unnecessary.
- Clearing the cache for a verrrrrrrryyyyyyyyyy BIG and super busy site is expensive.
MODX clears everything under the particular context, and that makes site slower because it has to rebuild ALL caches from scratch.
So, clearing it only when updating and needed, manually.
Hmm... may be I should add some "Clear Context Cache" buttons under the contexts' names on grid for easy access.
— Reply to this email directly or view it on GitHub https://github.com/virtudraft/CrossContextsSettings/issues/9#issuecomment-124999601 .
upon context setting change whether value change or remove of setting, Context cache shall be refreshed:
$modx->cacheManager->refresh(array( 'context_settings' => array('contexts' => '$k') ));