Skip Menu |

This queue is for tickets about the Cache-Memcached-Managed CPAN distribution.

Report information
The Basics
Id: 41072
Status: new
Priority: 0/
Queue: Cache-Memcached-Managed

People
Owner: ELIZABETH [...] cpan.org
Requestors: norbi [...] nix.hu
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.20
Fixed in: (no value)



Subject: forget_dead_hosts is not implemented in C:M::Fast and C:M::libmemcached
The forget_dead_hosts() call in reset() breaks compatibility with Cache::Memcached::Fast and Cache::Memcached::libmemcached cache implementations. (From C:M::Fast the disconnect_all() sub is also missing, but that will be fixed soon, I hope.) The attached patch makes C:M::Managed to call forget_dead_hosts() only if the cache object has such a method.
Subject: Cache-Memcached-Managed-forget_dead_hosts-fix.diff
diff -Naur Cache-Memcached-Managed-0.20/lib/Cache/Memcached/Managed.pm Cache-Memcached-Managed-0.20-fixed/lib/Cache/Memcached/Managed.pm --- Cache-Memcached-Managed-0.20/lib/Cache/Memcached/Managed.pm 2008-05-19 15:41:57.000000000 +0200 +++ Cache-Memcached-Managed-0.20-fixed/lib/Cache/Memcached/Managed.pm 2008-11-19 22:55:56.000000000 +0100 @@ -762,7 +762,7 @@ foreach ($data == $directory ? ($data) : ($data,$directory)) { $_->disconnect_all; - $_->forget_dead_hosts; # not sure official C::Memcached API + $_->forget_dead_hosts if $_->can('forget_dead_hosts'); # not sure official C::Memcached API } # Make sure we try to connect again
Subject: Re: [rt.cpan.org #41072] AutoReply: forget_dead_hosts is not implemented in C:M::Fast and C:M::libmemcached
Date: Tue, 10 Feb 2009 12:52:13 +0100
To: bug-Cache-Memcached-Managed [...] rt.cpan.org
From: BUCHMULLER Norbert <norbi [...] nix.hu>
Show quoted text
> The forget_dead_hosts() call in reset() breaks compatibility with > Cache::Memcached::Fast and Cache::Memcached::libmemcached cache > implementations. (From C:M::Fast the disconnect_all() sub is also > missing, but that will be fixed soon, I hope.) > > The attached patch makes C:M::Managed to call forget_dead_hosts() only > if the cache object has such a method.
Sorry for being impatient, but can you please give some feedback regarding my patch? norbi