[Cache] clarify RedisStore::evaluate()
This commit is contained in:
parent
18646891a3
commit
450d33ff3b
@ -281,19 +281,15 @@ class RedisStore implements SharedLockStoreInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
|
|
||||||
return $this->redis->_instance($this->redis->_target($resource))->eval($script, array_merge([$resource], $args), 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->redis instanceof \Predis\ClientInterface) {
|
\assert($this->redis instanceof \Predis\ClientInterface);
|
||||||
try {
|
|
||||||
return $this->redis->eval(...array_merge([$script, 1, $resource], $args));
|
|
||||||
} catch (ServerException $e) {
|
|
||||||
throw new LockStorageException($e->getMessage(), $e->getCode(), $e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new InvalidArgumentException(sprintf('"%s()" expects being initialized with a Redis, RedisArray, RedisCluster or Predis\ClientInterface, "%s" given.', __METHOD__, get_debug_type($this->redis)));
|
try {
|
||||||
|
return $this->redis->eval(...array_merge([$script, 1, $resource], $args));
|
||||||
|
} catch (ServerException $e) {
|
||||||
|
throw new LockStorageException($e->getMessage(), $e->getCode(), $e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getUniqueToken(Key $key): string
|
private function getUniqueToken(Key $key): string
|
||||||
|
Reference in New Issue
Block a user