mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Added default prefix to cache configurations.
This commit is contained in:
parent
9d0a67ddec
commit
64d4387c82
2 changed files with 10 additions and 4 deletions
|
@ -308,13 +308,16 @@ if (Configure::read('debug') >= 1) {
|
||||||
$duration = '+10 seconds';
|
$duration = '+10 seconds';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Prefix each application on the same server with a different string, to avoid Memcache and APC conflicts.
|
||||||
|
$prefix = 'myapp_';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configure the cache used for general framework caching. Path information,
|
* Configure the cache used for general framework caching. Path information,
|
||||||
* object listings, and translation cache files are stored with this configuration.
|
* object listings, and translation cache files are stored with this configuration.
|
||||||
*/
|
*/
|
||||||
Cache::config('_cake_core_', array(
|
Cache::config('_cake_core_', array(
|
||||||
'engine' => $engine,
|
'engine' => $engine,
|
||||||
'prefix' => 'cake_core_',
|
'prefix' => $prefix . 'cake_core_',
|
||||||
'path' => CACHE . 'persistent' . DS,
|
'path' => CACHE . 'persistent' . DS,
|
||||||
'serialize' => ($engine === 'File'),
|
'serialize' => ($engine === 'File'),
|
||||||
'duration' => $duration
|
'duration' => $duration
|
||||||
|
@ -326,7 +329,7 @@ Cache::config('_cake_core_', array(
|
||||||
*/
|
*/
|
||||||
Cache::config('_cake_model_', array(
|
Cache::config('_cake_model_', array(
|
||||||
'engine' => $engine,
|
'engine' => $engine,
|
||||||
'prefix' => 'cake_model_',
|
'prefix' => $prefix . 'cake_model_',
|
||||||
'path' => CACHE . 'models' . DS,
|
'path' => CACHE . 'models' . DS,
|
||||||
'serialize' => ($engine === 'File'),
|
'serialize' => ($engine === 'File'),
|
||||||
'duration' => $duration
|
'duration' => $duration
|
||||||
|
|
|
@ -308,13 +308,16 @@ if (Configure::read('debug') >= 1) {
|
||||||
$duration = '+10 seconds';
|
$duration = '+10 seconds';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Prefix each application on the same server with a different string, to avoid Memcache and APC conflicts.
|
||||||
|
$prefix = 'myapp_';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configure the cache used for general framework caching. Path information,
|
* Configure the cache used for general framework caching. Path information,
|
||||||
* object listings, and translation cache files are stored with this configuration.
|
* object listings, and translation cache files are stored with this configuration.
|
||||||
*/
|
*/
|
||||||
Cache::config('_cake_core_', array(
|
Cache::config('_cake_core_', array(
|
||||||
'engine' => $engine,
|
'engine' => $engine,
|
||||||
'prefix' => 'cake_core_',
|
'prefix' => $prefix . 'cake_core_',
|
||||||
'path' => CACHE . 'persistent' . DS,
|
'path' => CACHE . 'persistent' . DS,
|
||||||
'serialize' => ($engine === 'File'),
|
'serialize' => ($engine === 'File'),
|
||||||
'duration' => $duration
|
'duration' => $duration
|
||||||
|
@ -326,7 +329,7 @@ Cache::config('_cake_core_', array(
|
||||||
*/
|
*/
|
||||||
Cache::config('_cake_model_', array(
|
Cache::config('_cake_model_', array(
|
||||||
'engine' => $engine,
|
'engine' => $engine,
|
||||||
'prefix' => 'cake_model_',
|
'prefix' => $prefix . 'cake_model_',
|
||||||
'path' => CACHE . 'models' . DS,
|
'path' => CACHE . 'models' . DS,
|
||||||
'serialize' => ($engine === 'File'),
|
'serialize' => ($engine === 'File'),
|
||||||
'duration' => $duration
|
'duration' => $duration
|
||||||
|
|
Loading…
Reference in a new issue