mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Use file cache as the default cache engine.
Too many people had issues using APC by default as its often configured in strange ways, and works poorly on inexpensive hosting. Fixes #2995
This commit is contained in:
parent
69eba678f4
commit
2f7f5e1322
2 changed files with 11 additions and 10 deletions
|
@ -232,17 +232,16 @@
|
|||
//date_default_timezone_set('UTC');
|
||||
|
||||
/**
|
||||
* Pick the caching engine to use. If APC is enabled use it.
|
||||
* If running via cli - apc is disabled by default. ensure it's available and enabled in this case
|
||||
* Configure the cache handlers that CakePHP will use for internal
|
||||
* metadata like class maps, and model schema.
|
||||
*
|
||||
* By default File is used, but for improved performance you should use APC.
|
||||
*
|
||||
* Note: 'default' and other application caches should be configured in app/Config/bootstrap.php.
|
||||
* Please check the comments in boostrap.php for more info on the cache engines available
|
||||
* and their setttings.
|
||||
*/
|
||||
$engine = 'File';
|
||||
if (extension_loaded('apc') && function_exists('apc_dec') && (php_sapi_name() !== 'cli' || ini_get('apc.enable_cli'))) {
|
||||
$engine = 'Apc';
|
||||
}
|
||||
|
||||
// In development mode, caches should expire quickly.
|
||||
$duration = '+999 days';
|
||||
|
|
|
@ -293,14 +293,16 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Pick the caching engine to use. If APC is enabled use it.
|
||||
* If running via cli - apc is disabled by default. ensure it's available and enabled in this case
|
||||
* Configure the cache handlers that CakePHP will use for internal
|
||||
* metadata like class maps, and model schema.
|
||||
*
|
||||
* By default File is used, but for improved performance you should use APC.
|
||||
*
|
||||
* Note: 'default' and other application caches should be configured in app/Config/bootstrap.php.
|
||||
* Please check the comments in boostrap.php for more info on the cache engines available
|
||||
* and their setttings.
|
||||
*/
|
||||
$engine = 'File';
|
||||
if (extension_loaded('apc') && function_exists('apc_dec') && (php_sapi_name() !== 'cli' || ini_get('apc.enable_cli'))) {
|
||||
$engine = 'Apc';
|
||||
}
|
||||
|
||||
// In development mode, caches should expire quickly.
|
||||
$duration = '+999 days';
|
||||
|
|
Loading…
Reference in a new issue