module Protocol::Redis::Methods::Server

Public Instance Methods

flushdb!() click to toggle source

Remove all keys from the current database. @see redis.io/commands/flushdb @param async [Enum]

# File lib/protocol/redis/methods/server.rb, line 48
def flushdb!
        call('FLUSHDB')
end
info() click to toggle source

Get information and statistics about the server. @see redis.io/commands/info @param section [String]

# File lib/protocol/redis/methods/server.rb, line 31
def info
        metadata = {}
        
        call('INFO').each_line(Redis::Connection::CRLF) do |line|
                key, value = line.split(':')
                
                if value
                        metadata[key.to_sym] = value.chomp!
                end
        end
        
        return metadata
end