Cache-Memcached-libmemcached
view release on metacpan or search on metacpan
0.02006 - 09 May 2008
- Namespace support was ot properly working. fixed.
0.02005 - 18 Apr 2008
- Explicitly require version of Test::More
- Treat expiration time / time as a special case and don't proxy undef
to memcached_* method calls.
0.02004 - 17 Apr 2008
- Require Memcached::libmemcached 0.1902
- Explcitly weaken reference to self in the callbacks
0.02003 - 13 Apr 2008
- Add stats() method
- Require Memcached::libmemcached 0.1901
0.02002 - 30 Mar 2008
- Auto-generate accessors.
- Add docs and tests for hashing_algorithm and distribution_method.
They can also be specified in the constructor.
- Add more docs that deals with libmemcached-specific features
lib/Cache/Memcached/libmemcached.pm view on Meta::CPAN
use strict;
use warnings;
use Memcached::libmemcached 1.001701, qw(
MEMCACHED_CALLBACK_PREFIX_KEY
MEMCACHED_PREFIX_KEY_MAX_SIZE
);
use base qw(Memcached::libmemcached);
use Carp qw(croak carp);
use Scalar::Util qw(weaken);
use Storable ();
our $VERSION = '0.04001';
use constant HAVE_ZLIB => eval { require Compress::Zlib } && !$@;
use constant F_STORABLE => 1;
use constant F_COMPRESS => 2;
use constant OPTIMIZE => $ENV{PERL_LIBMEMCACHED_OPTIMIZE} ? 1 : 0;
my %behavior;
lib/Cache/Memcached/libmemcached.pm view on Meta::CPAN
# for compatibility with Cache::Memcached
# push @{$self->{servers}}, $server;
}
sub _mk_callbacks
{
my $self = shift;
weaken($self);
my $inflate = sub {
my ($key, $flags) = @_;
if ($flags & F_COMPRESS) {
if (! HAVE_ZLIB) {
croak("Data for $key is compressed, but we have no Compress::Zlib");
}
$_ = Compress::Zlib::memGunzip($_);
}
if ($flags & F_STORABLE) {
( run in 0.609 second using v1.01-cache-2.11-cpan-65fba6d93b7 )