LWP::UserAgent::WithCache - LWP::UserAgent extension with local cache
use LWP::UserAgent::WithCache; my %cache_opt = ( 'namespace' => 'lwp-cache', 'cache_root' => "$HOME/.cache", 'default_expires_in' => 600 ); my $ua = LWP::UserAgent::WithCache->new(\%cache_opt); my $response = $ua->get('http://search.cpan.org/');
LWP::UserAgent::WithCache is a LWP::UserAgent extention. It handle 'If-Modified-Since' request header with local cache file. local cache files are implemented by Cache::FileCache.
TBD.
LWP::UserAgent, Cache::Cache, Cache::FileCache
Masayoshi Sekimura <sekimura@qootas.org>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install LWP::UserAgent::WithCache, copy and paste the appropriate command in to your terminal.
cpanm
cpanm LWP::UserAgent::WithCache
CPAN shell
perl -MCPAN -e shell install LWP::UserAgent::WithCache
For more information on module installation, please visit the detailed CPAN module installation guide.