mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-39554 cache: forced sharing options for static + request
This commit is contained in:
parent
5df9bc3998
commit
bd12f745b7
1 changed files with 20 additions and 12 deletions
8
cache/classes/config.php
vendored
8
cache/classes/config.php
vendored
|
@ -231,6 +231,13 @@ class cache_config {
|
||||||
// Invalid cache mode used for the definition.
|
// Invalid cache mode used for the definition.
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if ($conf['mode'] === cache_store::MODE_SESSION || $conf['mode'] === cache_store::MODE_REQUEST) {
|
||||||
|
// We force this for session and request caches.
|
||||||
|
// They are only allowed to use the default as we don't want people changing them.
|
||||||
|
$conf['sharingoptions'] = cache_definition::SHARING_DEFAULT;
|
||||||
|
$conf['selectedsharingoption'] = cache_definition::SHARING_DEFAULT;
|
||||||
|
$conf['userinputsharingkey'] = '';
|
||||||
|
} else {
|
||||||
// Default the sharing option as it was added for 2.5.
|
// Default the sharing option as it was added for 2.5.
|
||||||
// This can be removed sometime after 2.5 is the minimum version someone can upgrade from.
|
// This can be removed sometime after 2.5 is the minimum version someone can upgrade from.
|
||||||
if (!isset($conf['sharingoptions'])) {
|
if (!isset($conf['sharingoptions'])) {
|
||||||
|
@ -246,6 +253,7 @@ class cache_config {
|
||||||
if (!isset($conf['userinputsharingkey'])) {
|
if (!isset($conf['userinputsharingkey'])) {
|
||||||
$conf['userinputsharingkey'] = '';
|
$conf['userinputsharingkey'] = '';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$this->configdefinitions[$id] = $conf;
|
$this->configdefinitions[$id] = $conf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue