/** * @param mixed $data */ protected function _storeInCache($data) { if (!$this->applicationCache instanceof Zend_Cache_Backend_Apc) { return; } $this->applicationCache->save($data, $this->getCacheKey()); }
/** * @see Zend_Cache_Backend_Apc::clean() * * @param string $mode clean mode * @param array $tags array of tags * @return boolean true if no problem */ public function clean($mode = Zend_Cache::CLEANING_MODE_ALL, $tags = array()) { if ($mode == Zend_Cache::CLEANING_MODE_ALL) { return parent::clean($mode, $tags); } if ($mode == Zend_Cache::CLEANING_MODE_OLD) { $this->_log("Better_Cache_Backend_Apc::clean() : CLEANING_MODE_OLD is unsupported by the Apc backend"); } if ($mode == Zend_Cache::CLEANING_MODE_MATCHING_TAG) { $tagArray = unserialize(apc_fetch(self::TAG_LIST)); foreach ($tagArray as $tag => $items) { if (in_array($tag, $tags)) { foreach ($items as &$id) { $this->remove($id); } } } return true; } if ($mode == Zend_Cache::CLEANING_MODE_NOT_MATCHING_TAG) { $tagArray = unserialize(apc_fetch(self::TAG_LIST)); foreach ($tagArray as $tag => &$items) { if (!in_array($tag, $tags)) { foreach ($items as $id) { $this->remove($id); unset($id); } } } return true; } return false; }
public function getFillingPercentage() { if (PHP_SAPI == 'cli') { return 0; } return parent::getFillingPercentage(); }
public function getFillingPercentage() { if (php_sapi_name() == 'cli') { return 0; } return parent::getFillingPercentage(); }