I have a chunk which is updated programatically by a cron job. Then I’ve found historically I need to clear the cache which I do using $modx->getCacheManager()->clearCache() - but that’s dumping the whole cache.
Should I need to be doing this?
If I’m loading the MODX object in my script, setting the content then using $object->save() and the chunk has “clear cache on save” checked, should I need to do this specifically or should be be done
Is there a better way
If I need to be using cache manager, I see docs about wielding the cache for my own benefit, but is there a way to specifically target just that specific chunk? Browsing the cache files for myself it looks like chunks don’t appear for themselves but rather as fields in the resource cache. Does that sound right and if so, is the best thing to target the resources that contain that chunk in their page output? And if so, is there a neat programmatic way to do that or do I just target the files in their predicable locations in the /cache/resources branch of the filesystem?