MDL-66367 core: use templaterev as the cache key when getting templates
This commit is contained in:
Vendored
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -89,7 +89,7 @@ define([
|
||||
}
|
||||
|
||||
// Now try local storage.
|
||||
var cached = storage.get('core_template/' + searchKey);
|
||||
var cached = storage.get('core_template/' + M.cfg.templaterev + ':' + searchKey);
|
||||
if (cached) {
|
||||
// Add this to the module cache for future.
|
||||
templateCache[searchKey] = cached;
|
||||
@@ -175,7 +175,7 @@ define([
|
||||
// Cache all of the dependent templates because we'll need them to render
|
||||
// the requested template.
|
||||
templateCache[tempSearchKey] = data.value;
|
||||
storage.set('core_template/' + tempSearchKey, data.value);
|
||||
storage.set('core_template/' + M.cfg.templaterev + ':' + tempSearchKey, data.value);
|
||||
|
||||
if (data.component == component && data.name == name) {
|
||||
// This is the original template that was requested so remember it to return.
|
||||
@@ -220,7 +220,7 @@ define([
|
||||
|
||||
if (requests.length) {
|
||||
// We have requests to send so resolve the deferred with the promises.
|
||||
serverRequestsDeferred.resolve(ajax.call(requests, true, false, false, 0, M.cfg.themerev));
|
||||
serverRequestsDeferred.resolve(ajax.call(requests, true, false, false, 0, M.cfg.templaterev));
|
||||
} else {
|
||||
// Nothing to load so we can resolve our deferred.
|
||||
serverRequestsDeferred.resolve();
|
||||
|
||||
Reference in New Issue
Block a user