Esempio n. 1
0
 /**
  * {@inheritdoc}
  */
 public function saveDeferred(CacheItemInterface $item)
 {
     if (!$item instanceof Item) {
         throw new InvalidArgumentException('MatthiasMullie\\Scrapbook\\Psr6\\Pool can only save
             MatthiasMullie\\Scrapbook\\Psr6\\Item objects');
     }
     $this->deferred[$item->getKey()] = $item;
     // let's pretend that this actually comes from cache (we'll store it
     // there soon), unless if it's already expired (in which case it will
     // never reach cache...)
     $item->overrideIsHit(!$item->isExpired());
     return true;
 }