line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
535
|
use 5.008001; use strict; use warnings; |
|
1
|
|
|
1
|
|
3
|
|
|
1
|
|
|
1
|
|
4
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
17
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
65
|
|
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package Plack::Middleware::NeverExpire; |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '1.007'; |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
6
|
BEGIN { require Plack::Middleware; our @ISA = 'Plack::Middleware' } |
|
1
|
|
|
|
|
32
|
|
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
12
|
use Plack::Util (); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
13
|
|
10
|
1
|
|
|
1
|
|
1139
|
use Time::Piece (); |
|
1
|
|
|
|
|
9833
|
|
|
1
|
|
|
|
|
29
|
|
11
|
1
|
|
|
1
|
|
8
|
use Time::Seconds (); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
133
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub call { |
14
|
1
|
|
|
1
|
1
|
21555
|
my $self = shift; |
15
|
|
|
|
|
|
|
Plack::Util::response_cb( $self->app->( shift ), sub { |
16
|
1
|
|
|
1
|
|
63
|
my $res = shift; |
17
|
1
|
50
|
|
|
|
5
|
return if $res->[0] != 200; |
18
|
1
|
|
|
|
|
9
|
my $date = Time::Piece->gmtime( time + Time::Seconds::ONE_YEAR ); |
19
|
1
|
|
|
|
|
73
|
Plack::Util::header_set( $res->[1], 'Expires', $date->strftime ); |
20
|
1
|
|
|
|
|
108
|
push @{ $res->[1] }, 'Cache-Control', 'max-age=' . Time::Seconds::ONE_YEAR . ', public'; |
|
1
|
|
|
|
|
4
|
|
21
|
1
|
|
|
|
|
6
|
return; |
22
|
1
|
|
|
|
|
10
|
} ); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
__END__ |