CodeIgniter 缓存类函数参考 - is_supported(driver['string'])

如果你通过 $this->cache->get() 来访问缓存适配器,此函数将自动触发。

但是,如果你希望有针对性的使用某个具体的缓存实现(如下例中的 APC),请确保调用此函数,用来检查服务器环境是否支持这种缓存类型。if ($this->cache->apc->is_supported()) { if ($data = $this->cache->apc->get('my_cache')) { // do things. } }