Cache::Memcached::Async - Asynchronous version of Cache::Memcached
# just like Cache::Memcached use Cache::Memcached::Async; my $mc = Cache::Memcached::Async->new(servers => [ '127.0.0.1:11211' ]);
This is a stripped-down version of Cache::Memcached that performs gets and sets asynchronously, notifying the caller of completion via the Danga::Socket loop.
It's used almost exactly like Cache::Memcached, except that get() and set() are allowed a callback parameter.
get()
set()
callback
Multi-gets are not supported.
For all the below methods, exptime and timeout are in seconds, and callback will be fired upon response from the server. callback may be undef.
exptime
timeout
new, add, replace, set, and delete all inherit semantics from Cache::Memcached.
new
add
replace
set
delete
Unlike Cache::Memcached, incr and decr do not return the new value of the key.
incr
decr
For get(), callback is passed the cached value on hit, or undef on miss.
Cache::Memcached
Jonathan Steinert <hachi@cpan.org>
Adam Thomason <athomason@sixapart.com>
Copyright (C) 2010 by Six Apart, Ltd.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.5 or, at your option, any later version of Perl 5 you may have available.
To install Cache::Memcached::Async, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Cache::Memcached::Async
CPAN shell
perl -MCPAN -e shell install Cache::Memcached::Async
For more information on module installation, please visit the detailed CPAN module installation guide.