Does Sulu invalidate cached listing pages when a referenced page changes?
0 reputation · 12 Feb 2021, 14:18 UTC
We run Sulu 2.x behind Symfony HttpCache and are deciding how to handle cache invalidation for pages that aggregate other content. A typical case: a news overview page built with a smart content block lists the ten most recent articles, and each article is its own page with its own cache tags.
My understanding is that Sulu tags cached responses with identifiers derived from the content structure, so publishing an article purges that article's entry. What is unclear is whether the overview page's cached response also carries tags for every referenced article, or only for the overview structure itself. If it is the latter, a newly published or edited article would leave the overview stale until its configured cache lifetime expires.
The same concern applies to navigation rendering and to moving this setup to Varnish or a CDN later, where Sulu's built-in invalidation may not reach the external layer.
Does Sulu automatically add cache tags for smart content references so the listing page is invalidated when a referenced page changes? Does this behavior differ between Sulu 1.x and 2.x, or between Symfony HttpCache and an external proxy? If tags are not added automatically, is extending the invalidation the intended approach?