Esempio n. 1
0
 /**
  * {@inheritDoc}
  */
 public function isHit()
 {
     if (!is_bool($this->hit)) {
         // before has
         if (!$this->cache->runExtensions(ES::STAGE_PRE_HAS, $this)) {
             return $this->setHit(false);
         }
         $this->expire = $this->cache->getDriver()->has($this->key);
         $this->hit = $this->expire < time() ? false : true;
         // after has
         if (!$this->cache->runExtensions(ES::STAGE_POST_HAS, $this)) {
             return $this->setHit(false);
         }
     }
     return $this->hit;
 }