Skip to content
Snippets Groups Projects

Issue #3493911: Add a CachedPlaceholderStrategy and use a placeholder to...

Closed Issue #3493911: Add a CachedPlaceholderStrategy and use a placeholder to...
2 unresolved threads
Closed catch requested to merge issue/drupal-3504902:3504902-try-to-preload into 11.x
2 unresolved threads
Files
4
@@ -98,6 +98,18 @@ public function getMultiple(&$cids, $allow_invalid = FALSE) {
$result = apcu_fetch(array_keys($map));
$cache = [];
if ($result) {
// Before checking the validity of each item individually, register the
// cache tags for all returned cache items for preloading, this allows the
// cache tag service to optimize cache tag lookups.
if ($this->checksumProvider instanceof CacheTagsChecksumPreloadInterface) {
$tags_for_preload = [];
foreach ($result as $item) {
if ($item->tags) {
$tags_for_preload[] = explode(' ', $item->tags);
}
}
$this->checksumProvider->registerCacheTagsForPreload(array_merge(...$tags_for_preload));
}
foreach ($result as $key => $item) {
$item = $this->prepareItem($item, $allow_invalid);
if ($item) {
Loading