From: umherirrender Date: Tue, 11 Feb 2014 18:50:34 +0000 (+0100) Subject: Document $wgResourceLoaderMaxage in DefaultSettings.php X-Git-Tag: 1.31.0-rc.0~16829 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/journal.php?a=commitdiff_plain;h=bcacc361ddbb262b54f80233ba9c06ef66592134;p=lhc%2Fweb%2Fwiklou.git Document $wgResourceLoaderMaxage in DefaultSettings.php To have a start and to remove the todo. Change-Id: I62421f1399c0f3e77238c39322028b969c0e925f --- 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(