I understand that Kirby has a cache ‘cache’ folder (docs). I guess it’s enabled by default and set to use file system caching by default (or is it APCU?). When deploying a new version, is there a recommended way to clear the cache, like so:
By default, Kirby comes with a file-based (not Apcu) caches for UUIDs and their panel plugin version checks, and there is no need to flush these caches after deployment.
However, if you are using other plugins that have their own caches, it may be helpful to clear those caches during deployment. For example, the Staticache plugin is one such case.
Caches that depend solely on data and content are generally safe to keep after a code deployment unless the new code affects them in some way—such as when changing a hardcoded URL in the code that has been cached.
Personally, I recommend targeting a few specific caches for removal instead of clearing everything, as the UUID cache may take some time to rebuild. That said, it should generally be fine to remove all caches if needed.
Thanks for the insights. I was also given this answer for reference:
It’s rm -rf site/cache/*/pages and yes, the default cache is file based. There is a folder per domain in the cache folder and in there, there can be several folders. The basic ones are uuid and pages.
I see the answer depends and might be opinionated.