MDL-37683 cache: siteidentifier is now included in the keys

This commit is contained in:
Sam Hemelryk 2013-02-06 13:45:17 +13:00
parent 1dd6835d8c
commit e0d9b7c0d4
11 changed files with 140 additions and 12 deletions

10
cache/locallib.php vendored
View file

@ -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();
}
}
/**