mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-66367 core: don't cache templates if templaterev is invalid
This commit is contained in:
parent
9e5edc7f68
commit
af8a70756f
3 changed files with 7 additions and 2 deletions
2
lib/amd/build/templates.min.js
vendored
2
lib/amd/build/templates.min.js
vendored
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];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue