diff --git a/app/Config/core.php b/app/Config/core.php index aa95b8130..2989f13cd 100644 --- a/app/Config/core.php +++ b/app/Config/core.php @@ -308,13 +308,16 @@ if (Configure::read('debug') >= 1) { $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, * object listings, and translation cache files are stored with this configuration. */ Cache::config('_cake_core_', array( 'engine' => $engine, - 'prefix' => 'cake_core_', + 'prefix' => $prefix . 'cake_core_', 'path' => CACHE . 'persistent' . DS, 'serialize' => ($engine === 'File'), 'duration' => $duration @@ -326,7 +329,7 @@ Cache::config('_cake_core_', array( */ Cache::config('_cake_model_', array( 'engine' => $engine, - 'prefix' => 'cake_model_', + 'prefix' => $prefix . 'cake_model_', 'path' => CACHE . 'models' . DS, 'serialize' => ($engine === 'File'), 'duration' => $duration diff --git a/lib/Cake/Console/Templates/skel/Config/core.php b/lib/Cake/Console/Templates/skel/Config/core.php index 7b529f74e..29b233159 100644 --- a/lib/Cake/Console/Templates/skel/Config/core.php +++ b/lib/Cake/Console/Templates/skel/Config/core.php @@ -308,13 +308,16 @@ if (Configure::read('debug') >= 1) { $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, * object listings, and translation cache files are stored with this configuration. */ Cache::config('_cake_core_', array( 'engine' => $engine, - 'prefix' => 'cake_core_', + 'prefix' => $prefix . 'cake_core_', 'path' => CACHE . 'persistent' . DS, 'serialize' => ($engine === 'File'), 'duration' => $duration @@ -326,7 +329,7 @@ Cache::config('_cake_core_', array( */ Cache::config('_cake_model_', array( 'engine' => $engine, - 'prefix' => 'cake_model_', + 'prefix' => $prefix . 'cake_model_', 'path' => CACHE . 'models' . DS, 'serialize' => ($engine === 'File'), 'duration' => $duration