Bug 8255: allow local cover images to be cached
authorJared Camins-Esakov <jcamins@cpbibliography.com>
Fri, 15 Jun 2012 17:59:55 +0000 (13:59 -0400)
committerPaul Poulain <paul.poulain@biblibre.com>
Mon, 25 Jun 2012 16:12:29 +0000 (18:12 +0200)
At the moment, local cover images cannot be cached by the web browser
or any intermediate reverse proxies. This results in an unnecessary
load on the server, and is entirely unnecessary.

Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
catalogue/image.pl
opac/opac-image.pl

index 4fa77e9..ff74cbe 100755 (executable)
@@ -92,8 +92,7 @@ if ( C4::Context->preference("LocalCoverImages") ) {
 }
 print $data->header(
     -type            => $mimetype,
-    -'Cache-Control' => 'no-store',
-    -expires         => 'now',
+    -expires         => '+30m',
     -Content_Length  => length($image)
 ), $image;
 
index ba554c7..e2dc556 100755 (executable)
@@ -92,8 +92,7 @@ if ( C4::Context->preference("OPACLocalCoverImages") ) {
 }
 print $data->header(
     -type            => $mimetype,
-    -'Cache-Control' => 'no-store',
-    -expires         => 'now',
+    -expires         => '+30m',
     -Content_Length  => length($image)
 ), $image;