I am not sure if its wrong to “hijack” this thread but I was about to ask a similar question. Is it possible flush the cache (the cache folder inside “site”) on deployment for example? Any scripts or command line tools?
@bvdputte Could you please post your code, flushing the cache works for me, although the route itself returns an error in my quick and dirty test.
@Philip If you flush the pages cache, only the pages cache folders are cleared. But you can, of course, also flush the other caches, including via script.
However, depending on how you deploy, this might not be necessary, because if you deploy via git or rsync, you could exclude the files for your deployment process.
@texnixe Thanks for quick reply. I get your point about the gitignore however my concern is that if I change something in the template locally and push to git and then deploy to server how would I go about making sure the cache is flushed/cleared?
I assume html markup is cached despite the cache is not creating a 100% static html file per page.