Mark articles as X-Forever and set max-age to 300
authorMarius Gavrilescu <marius@ieval.ro>
Fri, 7 Feb 2014 09:53:43 +0000 (11:53 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Fri, 7 Feb 2014 09:53:43 +0000 (11:53 +0200)
lib/Plack/App/Gruntmaster.pm

index 1fc3a85742b6a9c8a6f22a513bf819d0892186f6..508a81c9905cc22da6f14fec06259fb6be22a353 100644 (file)
@@ -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] ]
                }
        }
 
This page took 0.010219 seconds and 4 git commands to generate.