- 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 12:25pm 2 June 2024