diff --git a/core/apc-compat.php b/core/apc-compat.php new file mode 100644 index 000000000..cf2f40ef9 --- /dev/null +++ b/core/apc-compat.php @@ -0,0 +1,37 @@ + + +if (!function_exists('apc_store') && function_exists('apcu_store')) +{ + // Emulate the API of APC, over APCU + // Note: for PHP < 7, this compatibility used to be provided by APCU itself (if compiled with some options) + // for PHP 7+, it can be provided by the mean of apcu_bc, which is not so simple to install + // The current emulation aims at skipping this complexity + function apc_store($key, $var, $ttl = 0) + { + return apcu_store($key, $var, $ttl); + } + function apc_fetch($key) + { + return apcu_fetch($key); + } + function apc_delete($key) + { + return apcu_delete($key); + } +} diff --git a/core/metamodel.class.php b/core/metamodel.class.php index 07283abc8..34b492975 100644 --- a/core/metamodel.class.php +++ b/core/metamodel.class.php @@ -22,6 +22,7 @@ require_once(APPROOT.'core/querymodifier.class.inc.php'); require_once(APPROOT.'core/metamodelmodifier.inc.php'); require_once(APPROOT.'core/computing.inc.php'); require_once(APPROOT.'core/relationgraph.class.inc.php'); +require_once(APPROOT.'core/apc-compat.php'); /** * Metamodel