From: Marius Gavrilescu Date: Fri, 7 Feb 2014 09:53:43 +0000 (+0200) Subject: Mark articles as X-Forever and set max-age to 300 X-Git-Url: http://git.ieval.ro/?p=gruntmaster-page.git;a=commitdiff_plain;h=21d3525127c2c7aeb0b8a7266125681aed90d998 Mark articles as X-Forever and set max-age to 300 --- diff --git a/lib/Plack/App/Gruntmaster.pm b/lib/Plack/App/Gruntmaster.pm index 1fc3a85..508a81c 100644 --- a/lib/Plack/App/Gruntmaster.pm +++ b/lib/Plack/App/Gruntmaster.pm @@ -35,7 +35,7 @@ sub call { my $content = read_file "a/$article.$lang"; my $title = read_file "a/$article.$lang.title"; my $html = Gruntmaster::Page::Base::header($lang, $title) . $content . Gruntmaster::Page::Base::footer($lang); - return [200, ['Content-Type' => 'text/html', 'Content-Language' => $lang, 'Vary' => 'Accept-Language'], [$html] ] + return [200, ['Content-Type' => 'text/html', 'Content-Language' => $lang, 'Vary' => 'Accept-Language', 'X-Forever' => 1, 'Cache-Control' => 'max-age=300'], [$html] ] } }