clear memcache keys in locking

This commit is contained in:
Robin Appelman 2015-06-08 15:27:36 +02:00
parent ac9f998abd
commit 520a741876
1 changed files with 2 additions and 1 deletions

View File

@ -91,9 +91,10 @@ class MemcacheLockingProvider implements ILockingProvider {
if (isset($this->acquiredLocks['shared'][$path]) and $this->acquiredLocks['shared'][$path] > 0) { if (isset($this->acquiredLocks['shared'][$path]) and $this->acquiredLocks['shared'][$path] > 0) {
$this->memcache->dec($path); $this->memcache->dec($path);
$this->acquiredLocks['shared'][$path]--; $this->acquiredLocks['shared'][$path]--;
$this->memcache->cad($path, 0);
} }
} else if ($type === self::LOCK_EXCLUSIVE) { } else if ($type === self::LOCK_EXCLUSIVE) {
$this->memcache->cas($path, 'exclusive', 0); $this->memcache->cad($path, 'exclusive');
unset($this->acquiredLocks['exclusive'][$path]); unset($this->acquiredLocks['exclusive'][$path]);
} }
} }