MatthiasMullie\Scrapbook\Adapters\MemoryStore::cas PHP Method

cas() public method

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