# EVALSHA_RO

> Run a cached read-only Lua script by its SHA1 digest.

URL: https://docs.hotkv.com/commands/evalsha_ro/

```
EVALSHA_RO sha1 numkeys [key [key ...]] [arg [arg ...]]
```

- Group: Scripting and functions
- Complexity: Depends on the script
- HotKV Cloud: all plans
- On-Premise: no license needed

`EVALSHA_RO` runs a cached script by its SHA1 digest, like
[EVALSHA](https://docs.hotkv.com/commands/evalsha/index.md), with the read-only rules of
[EVAL_RO](https://docs.hotkv.com/commands/eval_ro/index.md): the script may not write, and the command can be
sent to read-only replicas.

## Return value

The script's return value, converted as described for
[EVAL](https://docs.hotkv.com/commands/eval/index.md).

Errors:

- `NOSCRIPT No matching script. Please use EVAL.` when the digest is not
  cached.
- The read-only errors of [EVAL_RO](https://docs.hotkv.com/commands/eval_ro/index.md).

## Examples

```
127.0.0.1:6379> SCRIPT LOAD "return redis.call('GET', KEYS[1])"
"d3c21d0c2b9ca22f82737626a27bcaf5d288f99f"
127.0.0.1:6379> EVALSHA_RO d3c21d0c2b9ca22f82737626a27bcaf5d288f99f 1 greeting
"hello"
```

## Compatibility

Same as Redis 7 and Valkey 8.

## See also

[EVALSHA](https://docs.hotkv.com/commands/evalsha/index.md), [EVAL_RO](https://docs.hotkv.com/commands/eval_ro/index.md),
[SCRIPT LOAD](https://docs.hotkv.com/commands/script-load/index.md)