MDL-69109 core: use different cache keys for FA icon maps
This commit is contained in:
@@ -434,7 +434,10 @@ class icon_system_fontawesome extends icon_system_font {
|
||||
if ($this->map === []) {
|
||||
$cache = \cache::make('core', 'fontawesomeiconmapping');
|
||||
|
||||
$this->map = $cache->get('mapping');
|
||||
// Create different mapping keys for different icon system classes, there may be several different
|
||||
// themes on the same site.
|
||||
$mapkey = 'mapping_'.preg_replace('/[^a-zA-Z0-9_]/', '_', get_class($this));
|
||||
$this->map = $cache->get($mapkey);
|
||||
|
||||
if (empty($this->map)) {
|
||||
$this->map = $this->get_core_icon_map();
|
||||
@@ -448,7 +451,7 @@ class icon_system_fontawesome extends icon_system_font {
|
||||
}
|
||||
}
|
||||
}
|
||||
$cache->set('mapping', $this->map);
|
||||
$cache->set($mapkey, $this->map);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user