Author: jason (yangjs17@yeah.net)
Example #1
0
 /**
  * 清除树形结构的缓存,不允许删除单个子树,由于一棵树是缓存在一个缓存里面
  * @return bool 是否清除成功
  */
 public function cleanCache()
 {
     unset(self::$tree[$this->cacheKey]);
     unset(self::$tree[$this->cacheKey . '_hash']);
     self::$tree = array();
     model('Cache')->rm($this->cacheKey);
     model('Cache')->rm($this->cacheKey . '_hash');
     return true;
 }