What's new in Valkey 9.0? Discover new features and improvements. Read the announcement.

SCRIPT SHOW

Show server-side Lua script in the script cache.

Usage
SCRIPT SHOW sha1
Complexity
O(1).
Since
8.0.0
ACL Categories
@scripting, @slow
Command flags
NOSCRIPT, STALE

Returns the original source code of a script in the script cache.

This command accepts a SHA1 digest and returns the original script's source code if the script is present in the script cache. It is intended primary for debugging, allowing users to introspect the contents of a script when they do not have direct access to it. For example, an admin may only have access to a script's SHA1 from the monitor or slowlog and needs to determine the script's contents for debugging.

For more information about EVAL scripts please refer to Introduction to Eval Scripts.

Replies

RESP2

Bulk string reply: Lua script if sha1 hash exists in script cache.

RESP3

Bulk string reply: Lua script if sha1 hash exists in script cache.