v2-hub icon indicating copy to clipboard operation
v2-hub copied to clipboard

Static cache invalidation rules don't clear paginated pages

Open aryehraber opened this issue 7 years ago • 2 comments

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.

aryehraber avatar Jan 15 '18 13:01 aryehraber

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.

jasonvarga avatar Jan 15 '18 15:01 jasonvarga

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?

stuartcusackie avatar Nov 04 '22 12:11 stuartcusackie