From 8bdd072676b65dc5916e4cb35eb7210e6ffadabc Mon Sep 17 00:00:00 2001 From: Jared Camins-Esakov Date: Fri, 15 Jun 2012 13:59:55 -0400 Subject: [PATCH] Bug 8255: allow local cover images to be cached 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 Signed-off-by: Paul Poulain Signed-off-by: Chris Cormack --- catalogue/image.pl | 3 +-- opac/opac-image.pl | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/catalogue/image.pl b/catalogue/image.pl index 4fa77e9056..ff74cbefcf 100755 --- a/catalogue/image.pl +++ b/catalogue/image.pl @@ -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; diff --git a/opac/opac-image.pl b/opac/opac-image.pl index ba554c7bef..e2dc5569db 100755 --- a/opac/opac-image.pl +++ b/opac/opac-image.pl @@ -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; -- 2.39.5