cas example



            // no luck, with concurrency, someone else acquire the lock             throw new LockConflictedException();
        }

        // Someone else steal the lock         if ($value !== $token) {
            throw new LockConflictedException();
        }

        if (!$this->memcached->cas($cas(string) $key$token$ttl)) {
            throw new LockConflictedException();
        }

        $this->checkNotExpired($key);
    }

    /** * @return void */
    public function delete(Key $key)
    {
        
Home | Imprint | This part of the site doesn't use cookies.