SCRIPT FLUSH [ASYNC | SYNC]
- Available since:
- Time complexity:
- O(N) with N being the number of scripts in cache
- ACL categories:
Flush the Lua scripts cache.
SCRIPT FLUSH will synchronously flush the cache.
Starting with Redis 6.2, 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 asynchronously
SYNC: flushes the cache synchronously
Behavior change history
>= 6.2.0: Default flush behavior now configurable by the lazyfree-lazy-user-flush configuration directive.
RESP2/RESP3 ReplySimple string reply:
- Starting with Redis version 6.2.0: Added the
SYNCflushing mode modifiers.