コード例 #1
0
 /**
  * Tries to load data from cache if available
  *
  * @param int $timestamp
  * @return mixed
  */
 protected function _loadFromCache($timestamp)
 {
     if (!$this->applicationCache instanceof Zend_Cache_Backend_Apc) {
         return false;
     }
     if ($timestamp > $this->applicationCache->test($this->getCacheKey())) {
         return false;
     }
     $cache = $this->applicationCache->load($this->getCacheKey());
     if (!$this->_isCacheValid($cache)) {
         return false;
     }
     return $cache;
 }
コード例 #2
0
 public function test($id)
 {
     if (PHP_SAPI == 'cli') {
         return false;
     }
     $id = $this->_processId($id);
     return parent::test($id);
 }
コード例 #3
0
ファイル: Apc.php プロジェクト: nsams/koala-framework
 public function test($id)
 {
     if (php_sapi_name() == 'cli') {
         return false;
     }
     $id = $this->_processId($id);
     return parent::test($id);
 }