Discussed with jandrews in irc.

If clearing with a wildcard like cache_clear_all('something:', $bin, TRUE);, the cache entries never get cleared. This is due to applying the lifetime to all wildcard clears, not just ones with empty cid, and also a mismatch between prefixes and the actual cid used by memcache when using prefixes.

CommentFileSizeAuthor
#2 get.patch1007 bytescatch
#1 prefixes.patch663 bytescatch
prefixes.patch1.08 KBcatch

Comments

catch’s picture

StatusFileSize
new663 bytes

Discussed with Jeremy in irc. The prefix change needs to happen how this patch still doesn't fix wildcard clears when cache lifetime is on, but it will cause issues when it's not (due to '*' not being empty).

Here's a quick patch which will only work with cache_lifetime = 0, once we properly confirm that as working we should move onto the lifetime issue.

catch’s picture

StatusFileSize
new1007 bytes

this patch fixed for one case but broke for the other. Even better my test page has both cache_get() and cache_get_multiple() with the same keys but took a while to track down exactly what was going on.

This appears to work both with and without a custom cache key, and with cache_get() or cache_get_multiple() - pretty sure the issue was cache_get_multiple() returning cache entries even if they're invalid.

jeremy’s picture

Status: Needs review » Fixed

I believe this was fixed here:
#888002: Wildcard clear lock contention

Please re-open if you're still having this issue with the latest dev code.

Status: Fixed » Closed (fixed)

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