Cache-Memcached-Fast
view release on metacpan or search on metacpan
Changes since 0.23:
Hunter McMillen (mcmillhj@gmail.com) provided patches to fix
RT#43537: undefined values passed to the multi functions no
longer cause segmentation faults.
Dmitry Shalashov (dimaniac83@mail.ru) provided patches that
replace the openhack project home reference with github.
Avoid an eval require on Scalar::Util per call to new,
just use sv_rvweaken directly.
0.23 2014-11-15
- add touch and touch_multi commands, speedup for the case
when application threads have per-thread Perl interpreters
(multithreaded Apache, etc.).
Changes since 0.22:
Alexandr Evstigneev (hurricup@gmail.com) provided patches that
if (memd->serialize_method)
{
SvREFCNT_dec(memd->serialize_method);
SvREFCNT_dec(memd->deserialize_method);
}
SvREFCNT_dec(memd->servers);
Safefree(memd);
void
_weaken(sv)
SV *sv
PROTOTYPE: $
CODE:
sv_rvweaken(sv);
void
enable_compress(memd, enable)
Cache_Memcached_Fast * memd
bool enable
PROTOTYPE: $$
CODE:
if (enable && ! memd->compress_method)
warn("Compression module was not found, can't enable compression");
lib/Cache/Memcached/Fast.pm view on Meta::CPAN
$conf->{compress_methods} //= [
sub { ${ $_[1] } = Compress::Zlib::memGzip( ${ $_[0] } ) },
sub { ${ $_[1] } = Compress::Zlib::memGunzip( ${ $_[0] } ) },
];
$conf->{serialize_methods} //= [ \&Storable::nfreeze, \&Storable::thaw ];
my $memd = $class->_new($conf);
my $context = [ $memd, $conf ];
_weaken( $context->[0] );
$instance{$$memd} = $context;
return $memd;
}
sub CLONE {
my $class = shift;
# Empty %instance and loop over the values.
for my $context ( delete @instance{ keys %instance } ) {
t/perl-namespace.t view on Meta::CPAN
use Test2::V0 -target => 'Cache::Memcached::Fast';
is [ keys %Cache::Memcached::Fast:: ] => bag {
item $_ for qw(
BEGIN CLONE DESTROY ISA VERSION __ANON__ bootstrap dl_load_flags
_destroy _new _weaken
disconnect_all enable_compress flush_all namespace new nowait_push
retrieve server_versions store
add add_multi
append append_multi
cas cas_multi
decr decr_multi
delete delete_multi
gat gat_multi
( run in 1.088 second using v1.01-cache-2.11-cpan-65fba6d93b7 )