Method: Redis#flushdb

Defined in:
lib/redis.rb

#flushdb(options = nil) ⇒ String

Remove all keys from the current database.

Parameters:

  • options (Hash) (defaults to: nil)
    • ‘:async => Boolean`: async flush (default: false)

Returns:

  • (String)

    ‘OK`



289
290
291
292
293
294
295
296
297
# File 'lib/redis.rb', line 289

def flushdb(options = nil)
  synchronize do |client|
    if options && options[:async]
      client.call(i[flushdb async])
    else
      client.call([:flushdb])
    end
  end
end