We've recently started using Redis, and the report page shows a "Render cache entries with most variations" list. I've got about a dozen items that look like this: entity_view:block:primaryfootermiddle: 1823 (route, url.site) - one for each of the standard header and footer elements/blocks of the page. These headers and footers are all the same on all pages of the site.

My assumption is that that 1800+ number indicates that there are 1800+ variations of these blocks, but since these are all the same on every page, shouldn't it be 1 variation?

Am I misunderstanding something here or do we have something wrong with how we are caching these blocks?

  • It seems likely the “route” context is causing the variations. Does your block need to vary for every single route? If not, you probably want to find what’s adding that context and stop it
    – Clive
    Oct 11, 2023 at 17:33
  • I don't think I want it to vary for every single route. The blocks and the content/links within the blocks are all the same across pages. There are also some blocks in the Redis report that it makes sense to have a lot of variations - things like "Hello $username" or whatever.
    – zip_000
    Oct 11, 2023 at 18:29
  • Which kind of block plugin is primaryfootermiddle. How do you add content to it?
    – 4uk4
    Oct 11, 2023 at 19:29
  • I'm actually not quite sure - this is an inherited site and I'm more of a sysadmin than dev... I think it is just a Custom Block. I can add/edit the content through the Custom Block Library. For the style/positioning of the blocks I have to use a twig template.
    – zip_000
    Oct 12, 2023 at 13:13
  • What field types are in the block type? How is the display mode configured? The url.site context looks like you display an absolute link, which is not necessary in most cases. What do you put in the body field, if the block has one, other than static content?
    – 4uk4
    Oct 13, 2023 at 9:52


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.