From: Thomas Mudrunka Date: Wed, 14 Dec 2011 04:48:14 +0000 (+0100) Subject: Barcode.class: pokus o cache-control X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=c6712080cfa133be17ae8e6ee18d7d009766978c;p=mirrors%2FSokoMan.git Barcode.class: pokus o cache-control --- diff --git a/lib/Barcode.class.php b/lib/Barcode.class.php index b4231e6..6b2ed56 100755 --- a/lib/Barcode.class.php +++ b/lib/Barcode.class.php @@ -51,7 +51,10 @@ class Barcode { } static function download_barcode($string='EXAMPLE', $convert='png', $enctype='code128b') { - if(self::test()) header('Content-Type: image/png'); else die(); + if(self::test()) { + header('Content-Type: image/png'); + header('Cache-Control: max-age=604800, public'); //1week caching + } else die(); die(self::cached_barcode($string,$convert,$enctype)); } }