src/LinguaLeo/Cache/Provider/RedisCache.php
public function create($key, callable $modifier, $ttl = 0)
    {
        $this->redis->watch($key);
        $data = $this->redis->get($key);
        $modifier($data);
        if ($this->setInTransaction($key, $data, (int)$ttl)) {
            return $data;
        }
        throw new AtomicViolationException("Atomic violation occurred when adding key \"{$key}\".");
    }
public function create($key, callable $modifier, $ttl = 0)
    {
        $this->redis->watch($key);
        $data = $this->redis->get($key);
        $modifier($data);
        if ($this->setInTransaction($key, $data, (int)$ttl)) {
            return $data;
        }
        throw new AtomicViolationException("Atomic violation occurred when adding key \"{$key}\".");
    }
{@inheritdoc}