staticache icon indicating copy to clipboard operation
staticache copied to clipboard

custom routes

Open jaro-io opened this issue 2 years ago β€’ 1 comments

hey everyone πŸͺ ✨ i am using a few simple custom routes, to remove parent page slugs from urls. it seems like the staticache plugin just ignores these pages? at least on my side, no cache files are generated. for all other pages it’s working fine.

any ideas on how to solve this? thank you so much! πŸ¦„

jaro-io avatar Jan 23 '23 15:01 jaro-io

Staticache directly hooks into Kirby's page cache and only caches the canonical URL of each page.

What you could do is to manually store the result of your route in a HTML file inside the cache directory. Your web server will then pick the cached result up from there as if it was cached by the plugin.

In the future it might make sense to hook into the router instead of into the page cache. This would allow us to handle routes natively. But it would also lead to an entirely different configuration setup.

lukasbestle avatar Jan 26 '23 20:01 lukasbestle