+ helper: add a function to check if apcu is enabled.

This commit is contained in:
liugang
2024-06-04 14:20:12 +08:00
committed by caoyanyi
parent 52005eeb8c
commit 7c4ace6b65
+12
View File
@@ -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.
*