eZ Platform Discussions

Content cache refresh/invalidate on multiple locations in v3.0.3

Dear eZFolks,

I wonder how to tell the http cache to invalidate content when gathering items from multiple locations for our front page. In our controller we fetch news items, event lists and an image gallery. If we put new content in any of those locations the front page does not update prior cache max ttl.

What are we missing? Should we add a new location and assign all front page objects in it and set x-location-id header?

Any help would be appreciated.

Hi Nielo!

You have to manually tag it - “tell” Varnish what content objects / locations are included in this page. You can do it in both controller code as well as from the template.

Please check out our documentation: https://doc.ezplatform.com/en/latest/guide/http_cache/#http-cache-tagging

Side note: X-Location-Id header is considered obsolete in v3, it’s usage should be replaced by proper tagging as soon as possible.

Cheers!

Too nice, thanks a load!