Example #1
0
 /**
  * 删除MemCache缓存
  */
 public function rm($cacheParam = '')
 {
     $this->processParam($cacheParam);
     if (empty($this->_cacheKey)) {
         return false;
     }
     return ZOL_Caching_Memcache::delete($this->_cacheKey);
 }
Example #2
0
 protected static function init()
 {
     if (empty(self::$mem)) {
         self::$mem = new Memcache();
         defined('MEMCACHE_CONF_KEY') || define('MEMCACHE_CONF_KEY', 'Memcache');
         $memConf = ZOL_Config::get(MEMCACHE_CONF_KEY);
         if ($memConf) {
             self::$servers = $memConf;
         }
         foreach (self::$servers as $val) {
             $exp = explode(':', $val);
             self::$mem->addServer($exp[0], $exp[1]);
         }
     }
 }