At what points does the cache for a page get flushed?
I have a list template that just get and prints links of a collection of pages. When editing any of these linked subpages will the cache for the list be reset?
If not – how to exclude all pages with that template from my cache? getting them all using site()->index() and adding their URI to config using a for-loop seems wasteful. the cache.ignore-array can not handle template definitions, right?
seriously? that makes caching almost useless when content is created/update frequently.
i have a customer with about 5k subpages and a dozend lists for filtering. i am fine with flushing the lists cache but when one of the 5k pages is updated all others are lost too. then its almost better to not cache at all.
is there any way for me to finetune this? writing a kirby component/extension?
Using Varnish instead of kirby’s cache might prove more useful in your situation. You can have kirby make a call to clear a subpage’s Varnish entry on a kirby hook.
Yes, caching is hard. Kirby’s cache is dumb in a good way, it rather caches less than having outdated pages in the cache.
The Kirby page cache can currently not be configured based on page dependencies or templates etc. as that makes it all very complex and reduces the performance when updating content (there was a discussion about this in another castle topic).
Using some dedicated caching software like Varnish probably makes sense for larger sites.