/** * Minify the data & write it to a CacheItemInterface object. * * @param CacheItemInterface $item Cache item to write the data to. * * @return CacheItemInterface Cache item with the minifier data. */ public function cache(CacheItemInterface $item) { $content = $this->execute(); $item->set($content); return $item; }
/** * {@inheritdoc} */ public final function saveDeferred(CacheItemInterface $item) { if (!$item instanceof CacheItem) { return false; } $this->deferred[$item->getKey()] = $item; return true; }