FLUSHDB
FLUSHDB [ASYNC | SYNC]
@keyspace, @write, @slow, @dangerous, Delete all the keys of the currently selected DB. This command never fails.
By default, FLUSHDB will synchronously flush all keys from the database. 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 database asynchronouslySYNC: flushes the database synchronouslyNote: an asynchronous FLUSHDB command only deletes keys that were present at the time the command was invoked. Keys created during an asynchronous flush will be unaffected.
>= 6.2.0: Default flush behavior now configurable by the lazyfree-lazy-user-flush configuration directive.ASYNC flushing mode modifier.SYNC flushing mode modifier.
© 2006–2022 Salvatore Sanfilippo
Licensed under the Creative Commons Attribution-ShareAlike License 4.0.
https://redis.io/commands/flushdb/