示例#1
0
 public static function get_instance()
 {
     if (!isset(self::$instance)) {
         self::$instance = new ApcCache();
     }
     return self::$instance;
 }
示例#2
0
 public static function del($key)
 {
     ApcCache::check();
     $res = false;
     apc_fetch($key, $res);
     return $res ? apc_delete($key) : true;
 }
示例#3
0
 /**
  * 
  * @param string $key
  * @throws \Puzzlout\Framework\Exceptions\NotImplementedException
  */
 public function Remove($key)
 {
     if (!$this->IsEnabled()) {
         return false;
     }
     $result = false;
     switch ($this->cacheType) {
         case BaseCache::TYPE_APC:
             $result = ApcCache::Init($this->app)->Remove($key);
             break;
         default:
             throw new \Puzzlout\Framework\Exceptions\NotImplementedException();
     }
     return $result;
 }