mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #7186 from dhensby/pulls/3.5/cache-prefix
FIX Add unique prefix to cache stores to prevent cache leak
This commit is contained in:
commit
d053c9aaac
4
cache/Cache.php
vendored
4
cache/Cache.php
vendored
@ -174,7 +174,9 @@ class SS_Cache {
|
|||||||
|
|
||||||
$backend = self::$backends[$backend_name];
|
$backend = self::$backends[$backend_name];
|
||||||
|
|
||||||
$basicOptions = array('cache_id_prefix' => $for);
|
$basicOptions = array(
|
||||||
|
'cache_id_prefix' => $for . '_' . md5(BASE_PATH) . '_',
|
||||||
|
);
|
||||||
|
|
||||||
if ($cache_lifetime >= 0) {
|
if ($cache_lifetime >= 0) {
|
||||||
$basicOptions['lifetime'] = $cache_lifetime;
|
$basicOptions['lifetime'] = $cache_lifetime;
|
||||||
|
@ -115,7 +115,8 @@ class SS_ConfigManifest {
|
|||||||
{
|
{
|
||||||
return SS_Cache::factory('SS_Configuration', 'Core', array(
|
return SS_Cache::factory('SS_Configuration', 'Core', array(
|
||||||
'automatic_serialization' => true,
|
'automatic_serialization' => true,
|
||||||
'lifetime' => null
|
'lifetime' => null,
|
||||||
|
'cache_id_prefix' => 'SS_Configuration_',
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user