* Add function to api helper.
This commit is contained in:
@@ -214,6 +214,19 @@ class helper extends baseHelper
|
||||
}
|
||||
return common::getSysURL() . $link;
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查是否启用缓存。
|
||||
* Check is enable cache.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function isCacheEnabled()
|
||||
{
|
||||
if(isset($_GET['_nocache']) || isset($_SERVER['HTTP_X_ZT_REFRESH'])) return false;
|
||||
global $config;
|
||||
return $config->cache->enable;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user