When true, performs the flush asynchronously. The command returns immediately and the deletion happens in the background. This is useful for large databases to avoid blocking the server.
const result = await redis.flushdb({ async: true });console.log(result); // "OK"// Deletion happens in background// Database may not be empty immediately
const before = await redis.dbsize();console.log(`Keys before flush: ${before}`);await redis.flushdb();const after = await redis.dbsize();console.log(`Keys after flush: ${after}`);