EVALSHA_RO
EVALSHA_RO sha1 numkeys [key [key ...]] [arg [arg ...]]
evalsha_ro(
sha: str, // SHA1 digest of the script
numkeys: int, // Number of keys in the script
*keys_and_args: Union[KeyT, EncodableT] // Keys and arguments for the script
) → Union[Awaitable[str], str] // Script execution result
Possible errors
- BUSY:
ResponseError - CLUSTERDOWN:
ClusterDownError - ERR wrong number of arguments:
ResponseError - MISCONF:
ResponseError - NOPERM:
NoPermissionError - NOREPLICAS:
ResponseError - NOSCRIPT:
NoScriptError - OOM:
OutOfMemoryError - READONLY:
ReadOnlyError
See Redis error messages for what each error means. Other errors, such as connection errors, aren't listed.
evalShaRo(
sha1: RedisArgument, // SHA1 digest of the script
options: EvalOptions // Script execution options including keys and arguments
) → ReplyUnion // Script execution result
Possible errors
- BUSY:
SimpleError(test witherr.message.startsWith('BUSY')) - CLUSTERDOWN:
SimpleError(test witherr.message.startsWith('CLUSTERDOWN')) - ERR wrong number of arguments:
SimpleError - MISCONF:
SimpleError(test witherr.message.startsWith('MISCONF')) - NOPERM:
SimpleError(test witherr.message.startsWith('NOPERM')) - NOREPLICAS:
SimpleError(test witherr.message.startsWith('NOREPLICAS')) - NOSCRIPT:
SimpleError(test witherr.message.startsWith('NOSCRIPT')) - OOM:
SimpleError(test witherr.message.startsWith('OOM')) - READONLY:
SimpleError(test witherr.message.startsWith('READONLY'))
See Redis error messages for what each error means. Other errors, such as connection errors, aren't listed.
evalshaReadonly(
sha1: String, // SHA1 digest of the script
keys: List<String>, // Keys for the script
args: List<String> // Arguments for the script
) → Object // Script execution result
Possible errors
- BUSY:
JedisBusyException - CLUSTERDOWN:
JedisClusterException - ERR wrong number of arguments:
JedisDataException - MISCONF:
JedisDataException - NOPERM:
JedisAccessControlException - NOREPLICAS:
JedisDataException - NOSCRIPT:
JedisNoScriptException - OOM:
JedisDataException - READONLY:
JedisDataException
See Redis error messages for what each error means. Other errors, such as connection errors, aren't listed.
evalshaReadOnly(
digest: String, // SHA1 of the script
type: ScriptOutputType, // Output type
keys: K[], // The keys
values: V... // The values
) → <T> T // Script result
Possible errors
- BUSY:
RedisBusyException - CLUSTERDOWN:
RedisCommandExecutionException - ERR wrong number of arguments:
RedisCommandExecutionException - MISCONF:
RedisCommandExecutionException - NOPERM:
RedisCommandExecutionException - NOREPLICAS:
RedisCommandExecutionException - NOSCRIPT:
RedisNoScriptException - OOM:
RedisCommandExecutionException - READONLY:
RedisReadOnlyException
See Redis error messages for what each error means. Other errors, such as connection errors, aren't listed.
evalshaReadOnly(
digest: String, // SHA1 of the script
type: ScriptOutputType, // The type
keys: K[], // The keys
values: V... // The values
) → <T> RedisFuture<T> // Script result
Possible errors
- BUSY:
RedisBusyException - CLUSTERDOWN:
RedisCommandExecutionException - ERR wrong number of arguments:
RedisCommandExecutionException - MISCONF:
RedisCommandExecutionException - NOPERM:
RedisCommandExecutionException - NOREPLICAS:
RedisCommandExecutionException - NOSCRIPT:
RedisNoScriptException - OOM:
RedisCommandExecutionException - READONLY:
RedisReadOnlyException
See Redis error messages for what each error means. Other errors, such as connection errors, aren't listed.
evalshaReadOnly(
digest: String, // SHA1 of the script
type: ScriptOutputType, // The type
keys: K[], // The keys
values: V... // The values
) → <T> Flux<T> // Script result
Possible errors
- BUSY:
RedisBusyException - CLUSTERDOWN:
RedisCommandExecutionException - ERR wrong number of arguments:
RedisCommandExecutionException - MISCONF:
RedisCommandExecutionException - NOPERM:
RedisCommandExecutionException - NOREPLICAS:
RedisCommandExecutionException - NOSCRIPT:
RedisNoScriptException - OOM:
RedisCommandExecutionException - READONLY:
RedisReadOnlyException
See Redis error messages for what each error means. Other errors, such as connection errors, aren't listed.
EvalShaRO(
ctx: context.Context, // Context for the operation
sha1: string, // SHA1 digest of the script
keys: []string, // Keys for the script
args: ...interface{} // Arguments for the script
) → *Cmd // Script execution result
Possible errors
- BUSY:
redis.Error(test withredis.HasErrorPrefix(err, "BUSY")) - CLUSTERDOWN:
redis.Error(test withredis.IsClusterDownError(err)) - ERR wrong number of arguments:
redis.Error - MISCONF:
redis.Error(test withredis.HasErrorPrefix(err, "MISCONF")) - NOPERM:
redis.Error(test withredis.IsPermissionError(err)) - NOREPLICAS:
redis.Error(test withredis.IsNoReplicasError(err)) - NOSCRIPT:
redis.Error(test witherrors.Is(err, redis.ErrNoScript)) - OOM:
redis.Error(test withredis.IsOOMError(err)) - READONLY:
redis.Error(test withredis.IsReadOnlyError(err))
See Redis error messages for what each error means. Other errors, such as connection errors, aren't listed.
ScriptEvaluateReadOnly(
hash: byte[], // SHA1 hash of the script
keys: RedisKey[]?, // Keys for the script
values: RedisValue[]?, // Arguments for the script
flags: CommandFlags // Command flags
) → RedisResult // Script execution result
Possible errors
- BUSY:
RedisConnectionException - CLUSTERDOWN:
RedisServerException - ERR wrong number of arguments:
RedisServerException - MISCONF:
RedisServerException - NOPERM:
RedisConnectionException - NOREPLICAS:
RedisServerException - NOSCRIPT:
RedisServerException - OOM:
RedisServerException - READONLY:
RedisConnectionException
See Redis error messages for what each error means. Other errors, such as connection errors, aren't listed.
ScriptEvaluateReadOnlyAsync(
hash: byte[], // SHA1 hash of the script
keys: RedisKey[]?, // Keys for the script
values: RedisValue[]?, // Arguments for the script
flags: CommandFlags // Command flags
) → Task<RedisResult> // Script execution result
Possible errors
- BUSY:
RedisConnectionException - CLUSTERDOWN:
RedisServerException - ERR wrong number of arguments:
RedisServerException - MISCONF:
RedisServerException - NOPERM:
RedisConnectionException - NOREPLICAS:
RedisServerException - NOSCRIPT:
RedisServerException - OOM:
RedisServerException - READONLY:
RedisConnectionException
See Redis error messages for what each error means. Other errors, such as connection errors, aren't listed.
evalsha_ro(
$sha1: string, // SHA1 digest of the script
$keys: array, // Keys for the script
$argument: ... // Arguments for the script
) → mixed // Script execution result
Possible errors
- BUSY:
Predis\Response\ServerException(test with$e->getErrorType() === 'BUSY') - CLUSTERDOWN:
Predis\Response\ServerException(test with$e->getErrorType() === 'CLUSTERDOWN') - ERR wrong number of arguments:
Predis\Response\ServerException - MISCONF:
Predis\Response\ServerException(test with$e->getErrorType() === 'MISCONF') - NOPERM:
Predis\Response\ServerException(test with$e->getErrorType() === 'NOPERM') - NOREPLICAS:
Predis\Response\ServerException(test with$e->getErrorType() === 'NOREPLICAS') - NOSCRIPT:
Predis\Response\ServerException(test with$e->getErrorType() === 'NOSCRIPT') - OOM:
Predis\Response\ServerException(test with$e->getErrorType() === 'OOM') - READONLY:
Predis\Response\ServerException(test with$e->getErrorType() === 'READONLY')
See Redis error messages for what each error means. Other errors, such as connection errors, aren't listed.
redis-rs has no dedicated method for this command. Send it with redis::cmd.
redis-rs has no dedicated method for this command. Send it with redis::cmd.
- Available since:
- Redis Open Source 7.0.0
- Time complexity:
- Depends on the script that is executed.
- ACL categories:
-
@slow,@scripting, - Compatibility:
- Redis Software and Redis Cloud compatibility
This is a read-only variant of the EVALSHA command that cannot execute commands that modify data.
For more information about when to use this command vs EVALSHA, please refer to Read-only scripts.
For more information about EVALSHA scripts please refer to Introduction to Eval Scripts.
Required arguments
sha1
The SHA1 digest of a read-only script previously cached with SCRIPT LOAD or EVAL_RO.
numkeys
The number of key names that follow. Arguments after the keys are passed as regular arguments.
Optional arguments
key [key ...]
The key names the script accesses, provided to it via the Lua KEYS global variable. There must be exactly numkeys of them.
arg [arg ...]
Additional arguments provided to the script via the Lua ARGV variable.
Redis Software and Redis Cloud compatibility
| Redis Software |
Redis Cloud |
Notes |
|---|---|---|
| ✅ Standard |
✅ Standard |