From bcacc361ddbb262b54f80233ba9c06ef66592134 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Tue, 11 Feb 2014 19:50:34 +0100 Subject: [PATCH] Document $wgResourceLoaderMaxage in DefaultSettings.php To have a start and to remove the todo. Change-Id: I62421f1399c0f3e77238c39322028b969c0e925f --- includes/DefaultSettings.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index b0ed35b2f9..029ef9788c 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -3159,14 +3159,23 @@ $wgResourceBasePath = null; /** * Maximum time in seconds to cache resources served by the resource loader. + * Used to set last modified headers (max-age/s-maxage). * - * @todo Document array structure + * Following options to distinguish: + * - versioned: Used for modules with a version, because changing version + * numbers causes cache misses. This normally has a long expiry time. + * - unversioned: Used for modules without a version to propagate changes + * quickly to clients. Also used for modules with errors to recover quickly. + * This normally has a short expiry time. + * + * Expiry time for the options to distinguish: + * - server: Squid/Varnish but also any other public proxy cache between the + * client and MediaWiki. + * - client: On the client side (e.g. in the browser cache). */ $wgResourceLoaderMaxage = array( 'versioned' => array( - // Squid/Varnish but also any other public proxy cache between the client and MediaWiki 'server' => 30 * 24 * 60 * 60, // 30 days - // On the client side (e.g. in the browser cache). 'client' => 30 * 24 * 60 * 60, // 30 days ), 'unversioned' => array( -- 2.20.1