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
This commit is contained in:
parent
5549172ef0
commit
737a19d7a4
1 changed files with 2 additions and 1 deletions
|
|
@ -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 <<<EOT
|
||||
<?xml version="1.0"?>
|
||||
|
|
|
|||
Loading…
Reference in a new issue