Example #1
0
 /**
  * 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;
 }
Example #2
0
 /**
  * {@inheritdoc}
  */
 public final function saveDeferred(CacheItemInterface $item)
 {
     if (!$item instanceof CacheItem) {
         return false;
     }
     $this->deferred[$item->getKey()] = $item;
     return true;
 }