mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
apc is disabled on the cli by default
Therefore, on the cli if the extension is loaded - it's necessary to check if it's also enabled. Otherwise on the cli there will be no cache.
This commit is contained in:
parent
3f4f9d0890
commit
65121a4292
1 changed files with 15 additions and 11 deletions
|
@ -284,9 +284,13 @@
|
|||
*
|
||||
*/
|
||||
|
||||
// Pick the caching engine to use. If APC is enabled use it.
|
||||
/**
|
||||
* Pick the caching engine to use. If APC is enabled use it.
|
||||
* If running via cli - apc is disabled by default. ensure it's avaiable and enabled in this case
|
||||
*
|
||||
*/
|
||||
$engine = 'File';
|
||||
if (extension_loaded('apc')) {
|
||||
if (extension_loaded('apc') && (php_sapi_name() !== 'cli' || ini_get('apc.enable_cli'))) {
|
||||
$engine = 'Apc';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue