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

Conflicts:
	lib/db/upgrade.php
	lib/moodlelib.php
	version.php
This commit is contained in:
Sam Hemelryk
2013-02-18 08:30:29 +13:00
parent 09de5eb3de
commit a2b5f389de
10 changed files with 106 additions and 10 deletions
+3
View File
@@ -203,6 +203,8 @@ class cache_factory {
}
// Get the class. Note this is a late static binding so we need to use get_called_class.
$definition = cache_definition::load_adhoc($mode, $component, $area, $options);
$config = $this->create_config_instance();
$definition->set_cache_identifier($config->get_site_identifier());
$definition->set_identifiers($identifiers);
$cache = $this->create_cache($definition, $identifiers);
if ($definition->should_be_persistent()) {
@@ -390,6 +392,7 @@ class cache_factory {
} else {
$definition = cache_definition::load($id, $definition, $aggregate);
}
$definition->set_cache_identifier($instance->get_site_identifier());
}
$this->definitions[$id] = $definition;
}