summaryrefslogtreecommitdiffstats
path: root/iredis/data/commands/flushdb.md
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-07-17 07:34:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-07-17 07:34:57 +0000
commitd71fd6264d58795c50b9350d7c39677b671e0896 (patch)
tree0aa9e0bd923a00b9ddda4e01af55a76ed314097c /iredis/data/commands/flushdb.md
parentReleasing debian version 1.9.1-3. (diff)
downloadiredis-d71fd6264d58795c50b9350d7c39677b671e0896.tar.xz
iredis-d71fd6264d58795c50b9350d7c39677b671e0896.zip
Merging upstream version 1.9.4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'iredis/data/commands/flushdb.md')
-rw-r--r--iredis/data/commands/flushdb.md15
1 files changed, 11 insertions, 4 deletions
diff --git a/iredis/data/commands/flushdb.md b/iredis/data/commands/flushdb.md
index 8c76001..ee47cc1 100644
--- a/iredis/data/commands/flushdb.md
+++ b/iredis/data/commands/flushdb.md
@@ -1,11 +1,18 @@
Delete all the keys of the currently selected DB. This command never fails.
-The time-complexity for this operation is O(N), N being the number of keys in
-the database.
+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.
-## `FLUSHDB ASYNC` (Redis 4.0.0 or greater)
+It is possible to use one of the following modifiers to dictate the flushing
+mode explicitly:
-See `FLUSHALL` for documentation.
+- `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