Cml\Lock\Base::unlock PHP Method

unlock() public method

解锁
public unlock ( string $key ) : void
$key string
return void
    public function unlock($key)
    {
        $key = $this->getKey($key);
        if (isset($this->lockCache[$key]) && $this->lockCache[$key] == Model::getInstance()->cache($this->useCache)->getInstance()->get($key)) {
            Model::getInstance()->cache($this->useCache)->getInstance()->delete($key);
            $this->lockCache[$key] = null;
            //防止gc延迟,判断有误
            unset($this->lockCache[$key]);
        }
    }