X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FGruntmaster%2FPage%2FJS.pm;h=fbaf3daaa163186ae1544a1b4139357a7d0d14d4;hb=16aa291dc49dceda7e612ed7eb2745036790d81c;hp=fa00293e52e622861206d31edeb87414e7253287;hpb=a94f84535623ae0de44b63290aa4c8b1bf3e5eaa;p=gruntmaster-page.git diff --git a/lib/Gruntmaster/Page/JS.pm b/lib/Gruntmaster/Page/JS.pm index fa00293..fbaf3da 100644 --- a/lib/Gruntmaster/Page/JS.pm +++ b/lib/Gruntmaster/Page/JS.pm @@ -11,13 +11,11 @@ use File::Slurp qw/read_file/; use JavaScript::Minifier::XS qw/minify/; sub generate{ - my ($self, $format, $logger) = @_; - debug $logger => ""; + my ($self, $format, $env) = @_; + debug $env => ""; my $js; $js .= read_file $_ for ; - [200, ['Content-Type' => 'application/javascript', 'Cache-Control' => 'max-age=604800'], [$js] ] + [200, ['Content-Type' => 'application/javascript', 'Cache-Control' => 'public, max-age=604800', 'X-Forever' => 1], [minify $js] ] } -sub variants{ [[js => 1, 'application/javascript', undef, undef, undef, undef]] } - 1