According to comments at
http://in3.php.net/manual/en/memcache.delete.php

$success = $mc->delete($full_key);

in function dmemcache_delete($key, $bin = 'cache') {
should be change to:

$success = $mc->delete($full_key, 0);

Without it on my system delete was not working.

CommentFileSizeAuthor
#7 fix_delete-1103796-71dev.patch452 bytesAnonymous (not verified)
#4 1103796-memcache_delete_fix-D618.patch463 bytesAnonymous (not verified)
#4 1103796-memcache_delete_fix-D61dev.patch463 bytesAnonymous (not verified)
#3 1103796-memcache_delete_fix-D618.patch471 bytesAnonymous (not verified)
#3 1103796-memcache_delete_fix-D61dev.patch412 bytesAnonymous (not verified)

Comments

drewish’s picture

This seems like a dupe of #1101374: Remove warnings and notices. it's got a bunch of unrelated changes. I'm a bigger fan of this patch.

fgm’s picture

#1101374: Remove warnings and notices. indeed contains 3 changes:

- the 0 argument, like in this one
- a warning removal to work around tiny incompatibilies between some combinations of the memcache extension and memcached daemon
- a bit of refactoring on return value, no functional change

Anonymous’s picture

Here is the patch for 6.x-1.8 and 6.x-1.x-dev versions

Anonymous’s picture

Sorry, here are the patches without prefixing.

Anonymous’s picture

Without this patch, if you run memcached 1.4.5, you'll notice weird behavior with CCK. When you try to update content, the database will have the new value in it, but fields will display old content. To your users it looks like you can't edit/change content. What is happening is that memcache can't delete it's cache, so it continues to serve up stale content.

catch’s picture

Version: 6.x-1.8 » 7.x-1.x-dev
Status: Needs review » Patch (to be ported)

Committed to 6.x-1.x, moving to D7.

Anonymous’s picture

StatusFileSize
new452 bytes

Here is the patch ported to 7.x-1.x-dev

catch’s picture

Status: Patch (to be ported) » Needs review

Will review later. Thanks for the re-roll.

catch’s picture

Status: Needs review » Fixed

Committed to 7.x-1.x, thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.