MatthiasMullie\Scrapbook\Adapters\MemoryStore::cas PHP 메소드

cas() 공개 메소드

public cas ( $token, $key, $value, $expire )
    public function cas($token, $key, $value, $expire = 0)
    {
        if (!$this->exists($key)) {
            return false;
        }
        $this->get($key, $comparison);
        if ($comparison !== $token) {
            return false;
        }
        return $this->set($key, $value, $expire);
    }