EVALSHA_RO
Executes a cached Lua script through the read-only invocation path.
Lua & functions · Example verified
Syntax covered here
EVALSHA_RO sha numkeys keyThe script is loaded with SCRIPT LOAD before invoking its digest to read a declared key.
Tested example & replies
Requests below run in order against an empty database. Each connection authenticates with the fixture password first. Quoted values are strings; null is a nil reply; arrays preserve RESP order.
# connection: default
> SET sample value
"OK"
# connection: default
> SCRIPT LOAD "return redis.call('GET', KEYS[1])"
"d3c21d0c2b9ca22f82737626a27bcaf5d288f99f"
# connection: default
> EVALSHA_RO d3c21d0c2b9ca22f82737626a27bcaf5d288f99f 1 sample
"value"