From: Brion Vibber Date: Tue, 29 Jan 2008 00:26:13 +0000 (+0000) Subject: Apply live hack from Wikimedia codebase: bump HTTP cache expiry on OpenSearch results... X-Git-Tag: 1.31.0-rc.0~49737 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/?a=commitdiff_plain;h=737a19d7a4ccba66765a78c706768f4c0ecd8acf;p=lhc%2Fweb%2Fwiklou.git Apply live hack from Wikimedia codebase: bump HTTP cache expiry on OpenSearch results from 5 to 10 minutes, and send a Cache-Control header as well as Expires for better squid support --- diff --git a/opensearch_desc.php b/opensearch_desc.php index b06b7feecf..70e90351bc 100644 --- a/opensearch_desc.php +++ b/opensearch_desc.php @@ -27,8 +27,9 @@ $response->header( 'Content-type: application/opensearchdescription+xml' ); # Set an Expires header so that squid can cache it for a short time # Short enough so that the sysadmin barely notices when $wgSitename is changed -$expiryTime = 300; # 5 minutes +$expiryTime = 600; # 10 minutes $response->header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', time() + $expiryTime ) . ' GMT' ); +$response->header( 'Cache-control: max-age=600' ); echo <<