// At first initialize it with "0"
$this->cache->add($cachekey, 0);
// Now the value has to be "0" because otherwise the key was used by another process meanwhile
// At first initialize it with "0"
$this->cache->add($cachekey, 0);
// Now the value has to be "0" because otherwise the key was used by another process meanwhile
- if ($this->cache->compareSet($cachekey, 0, getmypid(), 300)) {
+ if ($this->cache->compareSet($cachekey, 0, getmypid(), $ttl)) {
$this->cache->compareDelete($cachekey, getmypid());
$this->markRelease($key);
$this->cache->compareDelete($cachekey, getmypid());
$this->markRelease($key);