Adjust caching times for svg images
In the first period we set the caching time for server-side caching to 1 week and the value for client-side caching to 1 hour. Change-Id: Ieab63dfe9a00f31d64945180d7b0d98b9fe62b39
This commit is contained in:
parent
f5fbffb8ca
commit
ae930172fd
@ -32,7 +32,7 @@ class SpecialMathShowImage extends SpecialPage {
|
|||||||
$request->response()->header( "Content-type: image/svg+xml; charset=utf-8" );
|
$request->response()->header( "Content-type: image/svg+xml; charset=utf-8" );
|
||||||
}
|
}
|
||||||
if ( $success && !( $this->noRender ) ) {
|
if ( $success && !( $this->noRender ) ) {
|
||||||
$request->response()->header( 'Cache-Control: public max-age=2419200' ); // 4 weeks
|
$request->response()->header( 'Cache-Control: public, s-maxage=604800, max-age=3600' ); // 1 week (server) 1 hour (client)
|
||||||
$request->response()->header( 'Vary: User-Agent' );
|
$request->response()->header( 'Vary: User-Agent' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user