Document $wgResourceLoaderMaxage in DefaultSettings.php
authorumherirrender <umherirrender_de.wp@web.de>
Tue, 11 Feb 2014 18:50:34 +0000 (19:50 +0100)
committerTimo Tijhof <krinklemail@gmail.com>
Tue, 25 Feb 2014 08:39:31 +0000 (09:39 +0100)
To have a start and to remove the todo.

Change-Id: I62421f1399c0f3e77238c39322028b969c0e925f

includes/DefaultSettings.php

index b0ed35b..029ef97 100644 (file)
@@ -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(