Commit 7c0c55f8 authored by Jeremy's avatar Jeremy

Issue #1303384 by markpavlitski, EKM, Jeremy: manually release stampede protection lock when done.

parent a534d3df
......@@ -171,6 +171,12 @@ class MemCacheDrupal implements DrupalCacheInterface {
$memcache_expire = $cache->expire + (($cache->expire - REQUEST_TIME) * 2);
}
dmemcache_set($cid, $cache, $memcache_expire, $this->bin, $this->memcache);
// Release lock if acquired in $this->valid().
$lock = "memcache_$cid:$this->bin";
if (variable_get('memcache_stampede_protection', FALSE) && isset($GLOBALS['locks'][$lock])) {
lock_release("$lock");
}
}
function clear($cid = NULL, $wildcard = FALSE) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment