v2-hub
v2-hub copied to clipboard
Static cache invalidation rules don't clear paginated pages
Expected behaviour
Using the following invalidation rules, I expect all pages containing /company/blog to be cleared.
static_caching_invalidation:
collections:
blog:
urls:
- /company/blog*
After navigating around the blog a little, the following files are created inside /static/:
- /company/blog_.html
- /company/blog_page=1.html
- /company/blog_page=2.html
- /company/blog/my-entry_.html
So the blog index page (+ paginated versions) are cached, and the post itself is cached. Great!
After an edit to the existing entry, I expected ALL of these files to be cleared.
Actual behaviour
After editing the existing entry, the following files remain inside /static:
- /company/blog_page=1.html
- /company/blog_page=2.html
Basically, the 'regular' pages are cleared as expected, however the paginated versions are NOT.
Ah good catch.
Add static_caching_ignore_query_strings: false to caching.yaml and it should start working.
That's just a workaround though, so keep this open.
As of this date the config file contains this by default:
'ignore_query_strings' => false
I find it a little confusing. Is the problem solved by the above?