LWP::UserAgent::Cache::Memcached - LWP::UserAgent extension with memcached
use LWP::UserAgent::Cache::Memcached; my %cache_opt = ( 'namespace' => 'lwp-cache:', 'servers' => [ "10.0.0.15:11211", "10.0.0.15:11212", "/var/sock/memcached", "10.0.0.17:11211", [ "10.0.0.17:11211", 3 ] ], 'compress_threshold' => 10_000, 'exptime' => 600, ); my $ua = LWP::UserAgent::Cache::Memcached->new(\%cache_opt); my $response = $ua->get('http://search.cpan.org/');
LWP::UserAgent::Cache::Memcached is a LWP::UserAgent extention. It handle 'If-Modified-Since' request header with memcached. memcached are implemented by Cache::Memcached or Cache::Memcached::Fast. When you use this module, this module tries to use Cache::Memcached::Fast. If this call is fail, it uses Cache::Memcached.
LWP::UserAgent, Cache::Memcached, Cache::Memcached::Fast
This module is derived from LWP::UserAgent::WithCache code, and has been lightly modified since.
Kazuma Shiraiwa
Copyright (C) 2007,2008 by Kazuma Shiraiwa. This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.
To install LWP::UserAgent::Cache::Memcached, copy and paste the appropriate command in to your terminal.
cpanm
cpanm LWP::UserAgent::Cache::Memcached
CPAN shell
perl -MCPAN -e shell install LWP::UserAgent::Cache::Memcached
For more information on module installation, please visit the detailed CPAN module installation guide.