- Issue created by @mably
- Merge request !59Issue #15322734 by mably: Allow domain config entity to be put in static cache β (Merged) created by mably
- last update
over 1 year ago 93 pass - last update
over 1 year ago 93 pass - Status changed to Needs review
over 1 year ago 3:40pm 27 November 2023 - πΊπΈUnited States agentrickard Georgia (US)
Can you point to the documentation for this? It looks like a change from Drupal 8.
- π«π·France mably
Found this in Drupal 8.2 documentation:
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Entity%21...
So seems a rather old feature.
Found another description here:
Boolean indicating whether entities should be statically cached during a page request.
Could give a bit of performance improvement in some cases.
- πΊπΈUnited States agentrickard Georgia (US)
Thanks! This could also apply to the DomainAlias entity definition.
I wonder how we test for this -- there have to be cases where the entity cache gets stale. Though it looks like core simply handles it for us.
See /core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStaticCacheTest.php
The only possible issue here is that we often load domains very early in the bootstrap process, and the cache layer may not be present yet.
But just looking, this seems an obvious win.
- π«π·France mably
FWIW been used in production on several sites for several months now without any problems.
Automatically closed - issue fixed for 2 weeks with no activity.