/**
  * @param mixed $data
  */
 protected function _storeInCache($data)
 {
     if (!$this->applicationCache instanceof Zend_Cache_Backend_Apc) {
         return;
     }
     $this->applicationCache->save($data, $this->getCacheKey());
 }
Exemplo n.º 2
0
 public function save($data, $id, $tags = array(), $specificLifetime = false)
 {
     $id = $this->_processId($id);
     if (PHP_SAPI == 'cli') {
         $lifetime = $this->getLifetime($specificLifetime);
         Kwf_Util_Apc::callSaveCacheByCli(array('id' => $id, 'data' => serialize(array($data, time(), $lifetime))));
     }
     parent::save($data, $id, $tags, $specificLifetime);
     return true;
     //silently ignore apc_store returning false
 }