script-flush.3valkey - Man Page
Removes all server-side Lua scripts from the script cache.
Synopsis
SCRIPT FLUSH
[ASYNC
| SYNC
]
Description
Flush the Lua scripts cache.
By default, SCRIPT FLUSH
will synchronously flush the cache. Setting the lazyfree-lazy-user-flush configuration directive to “yes” changes the default flush mode to asynchronous.
It is possible to use one of the following modifiers to dictate the flushing mode explicitly:
ASYNC
: flushes the cache asynchronouslySYNC
: flushes the cache synchronously
For more information about EVAL
scripts please refer to valkey-eval-intro(7) Introduction to Eval Scripts.
Reply
valkey-protocol(7) Simple string reply: OK
.
Complexity
O(N) with N being the number of scripts in cache
Acl Categories
@scripting @slow
History
- Available since: 2.6.0
- Changed in 6.2.0: Added the
ASYNC
andSYNC
flushing mode modifiers.
See Also
eval(3valkey), evalsha(3valkey), evalsha_ro(3valkey), eval_ro(3valkey), fcall(3valkey), fcall_ro(3valkey), function(3valkey), function-delete(3valkey), function-dump(3valkey), function-flush(3valkey), function-help(3valkey), function-kill(3valkey), function-list(3valkey), function-load(3valkey), function-restore(3valkey), function-stats(3valkey), script(3valkey), script-debug(3valkey), script-exists(3valkey), script-help(3valkey), script-kill(3valkey), script-load(3valkey), script-show(3valkey)