cache = \Qii\Autoloader\Psr4::loadClass('\Qii\Cache', $cache)->initialization($policy);//载入cache类文件 } /** * 缓存内容 * * @param String $id * @param Array $value * @return Bool */ final public function cache($id, $value) { return $this->cache->set($id, $value); } /** * 获取缓存的类 */ final public function getCache() { return $this->cache; } /** * 获取缓存内容 * * @param String $id * @return Array */ final public function getCacheData($id) { return $this->cache->get($id); } }