X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FGruntmaster%2FPage%2FJS.pm;h=b8ddafba37e714c23349ca4f24fb494c96fd52cc;hb=fdbf59e5def9cbb4e1c0749f819ba8d946c37725;hp=ce4c3361becff5d4d65b45bc9880a6780c6fc5f0;hpb=7dc3247307f2e86af154dc449224f22ba8923c79;p=plack-app-gruntmaster.git diff --git a/lib/Gruntmaster/Page/JS.pm b/lib/Gruntmaster/Page/JS.pm index ce4c336..b8ddafb 100644 --- a/lib/Gruntmaster/Page/JS.pm +++ b/lib/Gruntmaster/Page/JS.pm @@ -11,11 +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'], [minify $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]] }