MDL-68677 core: Correct usage of templaterev for caching templates
authorAndrew Nicols <andrew@nicols.co.uk>
Tue, 12 May 2020 01:18:32 +0000 (09:18 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Thu, 14 May 2020 06:10:55 +0000 (14:10 +0800)
commitb9dec51ab4a750d08e9332a53cd6c640cd03e861
tree378f90599b21bd76db0ec0278f1625dceb089dff
parent206e179df5757db226cd1d24cd525fc5073f7fcd
MDL-68677 core: Correct usage of templaterev for caching templates

The M.cfg.templaterev variable should only be used to present persistent
caching, not caching of content within the same page load.

Preventing caching of same-page content makes it difficult to develop
for real user experiences as content is slow to load and does not give a
realistic and consistent loading experience.

This change affects the loading of partials specifically which notably
includes the loading spinner. Without this patch the loading icon is
often not seen at all because it does not load in a timely fashion and
the content being loaded is loaded first.
lib/amd/build/templates.min.js
lib/amd/build/templates.min.js.map
lib/amd/src/templates.js