CPAN-CachingProxy
view release on metacpan or search on metacpan
CachingProxy.pm view on Meta::CPAN
} else {
FORCE_CACHE_MISS:
my $expire = $this->{default_expire};
$expire = $this->{index_expire} if $pinfo =~ $this->{index_regexp};
$cache->set($CK, 1, $expire ); # doesn't seem like we should have to do this, but apparently we do
warn "[DEBUG] getting $URL\n" if $this->{debug};
my $fh = $cache->handle( $CK, ">", $expire );
my $request = HTTP::Request->new(GET => $URL);
my $announced_header;
my $response = $this->{ua}->request($request, sub {
my $chunk = shift;
unless( $announced_header ) {
my $res = shift;
$announced_header = 1;
$this->my_copy_hdr($res, "cache miss");
}
( run in 0.676 second using v1.01-cache-2.11-cpan-de7293f3b23 )