Exemplo n.º 1
0
 /**
  * 获取MemCache缓存
  * 可被重写
  * @return mixed
  */
 public function get($cacheParam = null)
 {
     $this->processParam($cacheParam);
     #返回缓存数据
     if (isset($this->_cachePool[$this->_cacheKey])) {
         return $this->_cachePool[$this->_cacheKey];
     }
     $data = ZOL_Caching_Memcache::get($this->_cacheKey);
     if ($data) {
         $this->_cachePool[$this->_cacheKey] = $data;
     } elseif ($this->_autoRefresh) {
         #自动更新缓存
         if ($this->refresh($this->_cacheParam)) {
             #重新获取缓存内容
             $data = $this->_content;
         }
     }
     return $data;
 }