Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293760

Manually clear cache keys from plugin managers with finite variations instead of using cache tags

$
0
0

Problem/Motivation

Follow-up from #3334489: ChainedFastBackend invalidates all items when cache tags are invalidated.

Several core plugin managers use cache tags for invalidation - for example the element info cache depends on the theme, so an 'element_info' cache tag is added, and that way the cache can be invalidated for all themes using the tag.

This is also done in at least some places by language.

This adds some overhead to cache gets, because the cache tag needs to be fetched. However, we know that the cache tag is not cleared arbitrarily, it's only used in ::clearCachedDefinitions()

element_info_build
* theme_registry
* library_info

Steps to reproduce

Proposed resolution

Instead of using a cache tag, loop over the list of themes in ::clearCachedDefinitions(), clearing each cid individually.

Remaining tasks

Anything straightforward I think we could do in one issue. There might be some other discovery mechanisms (breakpoints etc.) where we want to open spin-off issues.

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 293760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>