Definitions of "C" and "L" not entirely clear

Created on 2 May 2024, 8 months ago
Updated 2 June 2024, 7 months ago

Oleg - first off, thanks for taking the time to write and maintain this module - I can clearly see what a valuable tool this could be for troubleshooting cache issues.

I am not entirely clear on the difference between "C" and "N" in the output, however.

C - item cached, L - item wrapped by Lazy builder, N - normal item cache properties

Does "C" mean that the item has been cached by something other than the Internal Page Cache (IPC) module or the Dynamic Page Cache (DPC) module? If so, then does that mean that "N" means that the item has been cached by IPC or DPC?

Also - according to the Drupal core BlockViewBuilder class, pretty much all blocks other than the branding and title blocks use lazy_builder, no? If so, why don't I see an "L" when using Cache Review on menu blocks (as well as a few others)? For example, when using Olivero, neither the default footer block nor the RSS feed block are marked with an "L".

thanks,
-mike

💬 Support request
Status

Needs review

Version

1.1

Component

Documentation

Created by

🇺🇸United States ultimike Florida, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @ultimike
  • 🇺🇦Ukraine osab Germany, Baden-Württemberg; Ukraine, Kharkiv

    hi!
    Yes, it will be greate to have more clarity in Drupal Cache system ))

    -

    I am not entirely clear on the difference between "C" and "N" in the output, however.

    The idea was to have
    C - for cached items,
    L - for lazy built items and
    N - for others items without specific cache properties that take part in bubling results of caching page.

    Maybe it will be better to have description: C - item cached, L - item wrapped by Lazy builder, N - non-cached item without lazy.

    IPC - just for information, I think. It's kind to show that it is anonymouse and that's why IPC =HIT.

    -

    Also - according to the Drupal core BlockViewBuilder class, pretty much all blocks other than the branding and title blocks use lazy_builder, no? If so, why don't I see an "L" when using Cache Review on menu blocks (as well as a few others)

    So, yes, good question ). In general, I see that such block (for instance "block-olivero-site-branding") is cached despite '#lazy_builder'. The question is why and what to show for users in this case.. Let me a bit more time to sort out with this case. Thank you for helping on improvement!

  • 🇺🇸United States ultimike Florida, USA

    @osab,

    Just to ensure that I understand the difference between "C" and "N"...

    C - items that have specific cacheability settings set in their render array (either max-age or context).
    N - items that have default cacheability settings, so nothing specific related to max-age or context set in their render array.

    I think it is a bit confusing to say that N items are non-cached. I _think_ what you mean is that they are not cached by the render cache, but they can absolutely be cached by the IPC or DPC, correct?

    I spoke with someone at DrupalCon Portland about block caching and #lazy_builder and the short version of their response was "block caching is special". I _think_ that while all blocks are initially marked to be lazily built, there is some code somewhere deep in Drupal's rendering system (that I have been unable to locate yet) that determines if each block actually needs to be lazily built - if not, they are rendered and cached along with the rest of the page as part of IPC or DPC.

    -mike

  • 🇺🇦Ukraine osab Germany, Baden-Württemberg; Ukraine, Kharkiv

    Thank you @ultimike, you're right, I think. I've updated N-naming to "N- no specific cache properties" here https://www.drupal.org/project/cache_review/issues/3446118 📌 Add basic test and setup CI Needs work in one of commits.

  • Status changed to Needs review 7 months ago
  • 🇺🇦Ukraine osab Germany, Baden-Württemberg; Ukraine, Kharkiv
Production build 0.71.5 2024