isCache() public method

检查编译缓存是否存在
public isCache ( string $cacheId ) : boolean
$cacheId string 缓存的id
return boolean
Example #1
0
 public function testIsCache()
 {
     $template = new Template(['cache_id' => '__CACHE_ID__', 'display_cache' => true]);
     $this->assertTrue($template->isCache('__CACHE_ID__'));
     $template->display_cache = false;
     $this->assertTrue(!$template->isCache('__CACHE_ID__'));
 }