* Add function to api helper.

This commit is contained in:
songchenxuan
2023-06-28 15:23:36 +08:00
parent 9a32c51020
commit 30bd866bd4
+13
View File
@@ -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;
}
}
/**