MDL-66367 core: don't cache templates if templaterev is invalid
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
@@ -76,6 +76,11 @@ define([
|
||||
* @return {Object} jQuery promise resolved with the template source
|
||||
*/
|
||||
var getTemplatePromiseFromCache = function(searchKey) {
|
||||
// Do not cache anything if templaterev is not valid.
|
||||
if (M.cfg.templaterev <= 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// First try the cache of promises.
|
||||
if (searchKey in templatePromises) {
|
||||
return templatePromises[searchKey];
|
||||
|
||||
Reference in New Issue
Block a user