# SCRIPT

> Manage the server's Lua script cache.

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

```
SCRIPT LOAD script
SCRIPT EXISTS sha1 [sha1 ...]
SCRIPT FLUSH [ASYNC | SYNC]
SCRIPT KILL
SCRIPT DEBUG YES | SYNC | NO
SCRIPT HELP
```

- Group: Scripting and functions
- HotKV Cloud: all plans
- On-Premise: no license needed

`SCRIPT` is a container for subcommands that manage the cache of Lua scripts
used by [EVAL](https://docs.hotkv.com/commands/eval/index.md) and [EVALSHA](https://docs.hotkv.com/commands/evalsha/index.md).

| Subcommand | What it does |
| --- | --- |
| [SCRIPT LOAD](https://docs.hotkv.com/commands/script-load/index.md) | Compile a script and add it to the cache |
| [SCRIPT EXISTS](https://docs.hotkv.com/commands/script-exists/index.md) | Check whether scripts are cached |
| [SCRIPT FLUSH](https://docs.hotkv.com/commands/script-flush/index.md) | Empty the cache |
| [SCRIPT KILL](https://docs.hotkv.com/commands/script-kill/index.md) | Stop a long-running script that has not written yet |
| [SCRIPT DEBUG](https://docs.hotkv.com/commands/script-debug/index.md) | Accepted for compatibility; only `NO` is supported |
| `SCRIPT HELP` | A short description of each subcommand |

An unknown subcommand replies with
`ERR unknown subcommand '<name>'. Try SCRIPT HELP.`

## Examples

```
127.0.0.1:6379> SCRIPT LOAD "return ARGV[1]"
"098e0f0d1448c0a81dafe820f66d460eb09263da"
127.0.0.1:6379> SCRIPT EXISTS 098e0f0d1448c0a81dafe820f66d460eb09263da
1) (integer) 1
```

## Compatibility

The same subcommands as Redis 7 and Valkey 8, except that there is no script
debugger behind `SCRIPT DEBUG`.

## See also

[EVAL](https://docs.hotkv.com/commands/eval/index.md), [EVALSHA](https://docs.hotkv.com/commands/evalsha/index.md),
[FUNCTION](https://docs.hotkv.com/commands/function/index.md)