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.
Redis is the high-performance in-memory database used as data structure store. Redis supports hash, strings, lists and other complicated data structures by maintaining very high performance. Redis along with Node.js can be used as to solve various problems such as cache server or message broker. In this tutorial, we will cover popular and useful Redis …. Using Homebrew will save you lot of times in setting up and configuring the development environment on macOS. If you don’t have it in your Mac, try installing using the guideline here.
It is possible to use one of the following modifiers to dictate the flushing mode explicitly:
ASYNC
: flushes the database asynchronouslySYNC
: 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.