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);
    }