From c6712080cfa133be17ae8e6ee18d7d009766978c Mon Sep 17 00:00:00 2001 From: Thomas Mudrunka Date: Wed, 14 Dec 2011 05:48:14 +0100 Subject: [PATCH] Barcode.class: pokus o cache-control --- lib/Barcode.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)); } } -- 2.30.2