public function save(CacheItemInterface $item) { $this->memoryCache[$item->getTaggedKey()] = $item; return true; }
/** * {@inheritdoc} */ public function saveDeferred(CacheItemInterface $item) { if ($item instanceof TaggableItemInterface) { $key = $item->getTaggedKey(); } else { $key = $item->getKey(); } $this->deferred[$key] = $item; return true; }