+ helper: add a function to check if apcu is enabled.
This commit is contained in:
@@ -626,6 +626,18 @@ function checkOtherPriv(array $actionConfig, string $action, object $item, objec
|
||||
return common::hasPriv($module, $method, $item);
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查是否启用APCu。
|
||||
* Check if APCu is enabled.
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
function isAPCuEnabled(): bool
|
||||
{
|
||||
return extension_loaded('apcu') && ini_get('apc.enabled') == '1';
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the parent property of the data.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user