Skip Menu |

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

Report information
The Basics
Id: 91501
Status: new
Priority: 0/
Queue: Cache-Memcached-LibMemcached

People
Owner: Nobody in particular
Requestors: cholet [...] logilune.com
Cc:
AdminCc:

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



Subject: delete() causes cache corruption
Date: Wed, 18 Dec 2013 20:17:47 +0100
To: bug-Cache-Memcached-LibMemcached [...] rt.cpan.org
From: Éric Cholet <cholet [...] logilune.com>
When using both behavior_noreply and binary_protocol, deleting a non existent key causes cache corruption. The attached test demonstrates this. Removing either behavior_noreply or binary_protocol makes the test succeed. use strict; use lib "t/lib"; use libmemcached_test; use Test::More; my $LOOPS = 100; plan tests => 2 * $LOOPS; my $cache = libmemcached_test_create({ namespace => 'test:', behavior_noreply => 1, binary_protocol => 1, }); $cache->set('A', 'value A', 0); $cache->set('B', 'value B', 0); for my $i (1..$LOOPS) { my $A = $cache->get('A'); is($A, 'value A', "get A $i"); my $B = $cache->get('B'); is($B, 'value B', "get B $i"); $cache->delete('C'); } -- Éric Cholet