Hi all
I’m working on an snippet that will change a resource tv. Everything is Ok, But when i use this snippet to change my tv value, document cache make a problem. No change in showing that tv except i manually clear cache using Modx manager. Now is there any way like using API to clear only that resource cache?
thx
-
MODX Staff
- 10,725 Posts
You can refresh the entire cache or specific parts of it, but not just a single Resource. If you change cacheable data that is rendered on a cacheable Resource, you need to refresh the entire cache, otherwise, make the Resource non-cacheable or the specific TV tag you want to see changed values from.
Hi
Thx OpenGeek
So how clear entire cache or resources cache using an snippet?
thx
$modx->executeProcessor(array(
'location' => 'system',
'action' => 'clearCache',
));
user must have context access to clear cache...