Hello!
The question is simple: how to clear cache?
I use MODX 2.5.7
I have my static index.html stored in /assets/theme folder, any changes i make in this file are not displayed because this entire file is stored in /core/cache/resource/web/resources/1.cache.php
I tried executing $modx->cacheManager->refresh();, deleting all the contents of core/cache/ and turning off caching, but nothing works - the 1.cache.php gets ressurected any time i request the page. Sure i request the page with clean cookies and browser cache. Looks like MODX uses some black magic to store it's cache not only in cache folder but also somewhere else.
Note that i'm not a MODX developer, i'm not even a PHP dev.
Thanks in advance, your help is appreciated!
Manually deleting the files inside core/cache folder should work. You could also try passing a query string ie:
http://yoururl.com/index.php?id=1?refresh
Are you sure that the cached version of the page you are seeing is not from within your browser? Have you cleared your browsers cache? Tried viewing the site in another browser on another computer that has not recently viewed the site. Clearing all the files in the core/cache folder/directory should reset all cache within the MODX site.
Glyn Szasz
Sydney, Australia
Happy to help (when can) and happy to learn
If you are a Sydney based MODX developer would love to hear from you. Please contact me.
If you don't want to clear your browser cache, you can view the page in private or incognito mode to get the same effect.
As LK says, putting a query string at the end of the URL should also work, but be sure to change it after you make any changes and before testing.
FYI, the CacheClear extra will delete all files in the core/cache directory for you.