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
}
$self->memcached_behavior_set(&$behavior(), $value);
}
delete $args{readonly};
delete $args{no_rehash};
carp "Unrecognised options: @{[ sort keys %args ]}"
if %args;
# Set compression/serialization callbacks
$self->set_callback_coderefs(
# Closures so we have reference to $self
$self->_mk_callbacks()
);
# behavior options
foreach my $option (qw(no_block hashing_algorithm distribution_method binary_protocol)) {
my $method = "set_$option";
$self->$method( $args{$option} ) if exists $args{$option};
}
return $self;
}
lib/Cache/Memcached/libmemcached.pm view on Meta::CPAN
$self->memcached_server_add_with_weight($hostname, $port, $weight);
} else {
$self->memcached_server_add_unix_socket_with_weight( $server, $weight );
}
# 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");
}
( run in 1.256 second using v1.01-cache-2.11-cpan-9b1e4054eb1 )