/** * Unlock key, locked by method 'lock_key' * @param KeyAutoUnlocker $auto_unlocker * @return bool */ public function unlock_key(KeyAutoUnlocker $auto_unlocker) { $key = $auto_unlocker->getKey(); if (empty($key)) { $this->ReportError('Empty key in the AutoUnlocker', __LINE__); return false; } $auto_unlocker->revoke(); return $this->redis->Del($this->lock_key_prefix . $key); }
/** * Unlock key, locked by method 'lock_key' * @param KeyAutoUnlocker $auto_unlocker * @return bool */ public function unlock_key(KeyAutoUnlocker $auto_unlocker) { $key = $auto_unlocker->getKey(); $auto_unlocker->revoke(); return $this->memcache->delete($this->lock_key_prefix . $key); }