From 5beb388516acbce2116f19e6d5e0a783226d2eaa Mon Sep 17 00:00:00 2001 From: Mark Nelson Date: Mon, 12 Aug 2019 20:12:07 +0800 Subject: [PATCH] MDL-66367 core: added new cachetemplates setting --- admin/settings/appearance.php | 5 +++++ config-dist.php | 3 +++ lang/en/admin.php | 3 +++ lib/upgrade.txt | 3 +++ version.php | 2 +- 5 files changed, 15 insertions(+), 1 deletion(-) diff --git a/admin/settings/appearance.php b/admin/settings/appearance.php index 4730c3217ad..aaae7100045 100644 --- a/admin/settings/appearance.php +++ b/admin/settings/appearance.php @@ -275,4 +275,9 @@ preferences,moodle|/user/preferences.php|t/preferences', $temp->add(new admin_setting_configtextarea('additionalhtmlfooter', new lang_string('additionalhtmlfooter', 'admin'), new lang_string('additionalhtmlfooter_desc', 'admin'), '', PARAM_RAW)); $ADMIN->add('appearance', $temp); + $setting = new admin_setting_configcheckbox('cachetemplates', new lang_string('cachetemplates', 'admin'), + new lang_string('cachetemplates_help', 'admin'), 1); + $temp = new admin_settingpage('templates', new lang_string('templates', 'admin')); + $temp->add($setting); + $ADMIN->add('appearance', $temp); } // end of speedup diff --git a/config-dist.php b/config-dist.php index 5e4ae974da1..cf3118a44d8 100644 --- a/config-dist.php +++ b/config-dist.php @@ -654,6 +654,9 @@ $CFG->admin = 'admin'; // Prevent JS caching // $CFG->cachejs = false; // NOT FOR PRODUCTION SERVERS! // +// Prevent Template caching +// $CFG->cachetemplates = false; // NOT FOR PRODUCTION SERVERS! +// // Restrict which YUI logging statements are shown in the browser console. // For details see the upstream documentation: // http://yuilibrary.com/yui/docs/api/classes/config.html#property_logInclude diff --git a/lang/en/admin.php b/lang/en/admin.php index fa8f10fa451..5b0b23a83b4 100644 --- a/lang/en/admin.php +++ b/lang/en/admin.php @@ -104,6 +104,8 @@ $string['bookmarkdeleted'] = 'Bookmark deleted.'; $string['bookmarkthispage'] = 'Bookmark this page'; $string['cachejs'] = 'Cache Javascript'; $string['cachejs_help'] = 'Javascript caching and compression greatly improves page loading performance. it is strongly recommended for production sites. Developers will probably want to disable this feature.'; +$string['cachetemplates'] = 'Cache Templates'; +$string['cachetemplates_help'] = 'Template caching will improve page loading performance and is strongly recommended for production sites. Developers will probably want to disable this feature.'; $string['calendarexportsalt'] = 'Calendar export salt'; $string['calendarsettings'] = 'Calendar'; $string['calendartype'] = 'Calendar type'; @@ -1264,6 +1266,7 @@ $string['taskstatscron'] = 'Background processing for statistics'; $string['tasktagcron'] = 'Background processing for tags'; $string['tasktempfilecleanup'] = 'Delete stale temp files'; $string['tempdatafoldercleanup'] = 'Clean up temporary data files older than'; +$string['templates'] = 'Templates'; $string['testoutgoingmailconf'] = 'Test outgoing mail configuration'; $string['testoutgoingmaildetail'] = 'Note: Before testing, please save your configuration.
{$a}'; $string['testoutgoingmailconf_message'] = 'This is a test message to confirm that you have successfully configured your site\'s outgoing mail.'; diff --git a/lib/upgrade.txt b/lib/upgrade.txt index c02d911edfb..ac0b686aa92 100644 --- a/lib/upgrade.txt +++ b/lib/upgrade.txt @@ -53,6 +53,9 @@ validation against and defaults to null (so, no user needed) if not provided. * Following behat steps have been removed from core: - I go to "" in the course gradebook * A new admin setting widget 'core_admin\local\settings\filesize' is added. +* A new setting 'Cache templates' was added (see MDL-66367). This setting determines if templates are cached or not. + This setting can be set via the UI or by defining $CFG->cachetemplates in your config.php file. It is a boolean + and should be set to either false or true. Developers will probably want to set this to false. === 3.7 === diff --git a/version.php b/version.php index 1a5a4ba23f9..5dbe5c3d43c 100644 --- a/version.php +++ b/version.php @@ -29,7 +29,7 @@ defined('MOODLE_INTERNAL') || die(); -$version = 2019083000.00; // YYYYMMDD = weekly release date of this DEV branch. +$version = 2019090100.00; // YYYYMMDD = weekly release date of this DEV branch. // RR = release increments - 00 in DEV branches. // .XX = incremental changes.