summaryrefslogtreecommitdiffstats
path: root/iredis/data/commands/flushdb.md
blob: ee47cc12f91fdeefcd14d42fa001ef8851bf3e00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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 asynchronously
- `!SYNC`: flushes the database synchronously

Note: 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.

@return

@simple-string-reply