Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Prefix for cache configuration #438

Merged
merged 1 commit into from

1 participant

@predominant
Owner

Added prefix for cache configuration

@predominant predominant merged commit 4867902 into cakephp:2.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 22, 2012
  1. @predominant
This page is out of date. Refresh to see the latest.
View
7 app/Config/core.php
@@ -308,13 +308,16 @@
$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_model_', array(
'engine' => $engine,
- 'prefix' => 'cake_model_',
+ 'prefix' => $prefix . 'cake_model_',
'path' => CACHE . 'models' . DS,
'serialize' => ($engine === 'File'),
'duration' => $duration
View
7 lib/Cake/Console/Templates/skel/Config/core.php
@@ -308,13 +308,16 @@
$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_model_', array(
'engine' => $engine,
- 'prefix' => 'cake_model_',
+ 'prefix' => $prefix . 'cake_model_',
'path' => CACHE . 'models' . DS,
'serialize' => ($engine === 'File'),
'duration' => $duration
Something went wrong with that request. Please try again.