mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
MDL-37683 cache: siteidentifier is now included in the keys
This commit is contained in:
parent
1dd6835d8c
commit
e0d9b7c0d4
11 changed files with 140 additions and 12 deletions
10
cache/locallib.php
vendored
10
cache/locallib.php
vendored
|
@ -119,6 +119,7 @@ class cache_config_writer extends cache_config {
|
|||
*/
|
||||
protected function generate_configuration_array() {
|
||||
$configuration = array();
|
||||
$configuration['siteidentifier'] = $this->siteidentifier;;
|
||||
$configuration['stores'] = $this->configstores;
|
||||
$configuration['modemappings'] = $this->configmodemappings;
|
||||
$configuration['definitions'] = $this->configdefinitions;
|
||||
|
@ -524,6 +525,15 @@ class cache_config_writer extends cache_config {
|
|||
$this->config_save();
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the site identifier stored by the cache API.
|
||||
*
|
||||
* @param string $siteidentifier
|
||||
*/
|
||||
public function update_site_identifier($siteidentifier) {
|
||||
$this->siteidentifier = md5((string)$siteidentifier);
|
||||
$this->config_save();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue