RedisClient

A redis client with connection pooling.

Constructors

this
this(string host, ushort port)
Undocumented in source.

Members

Functions

auth
void auth(string password)

Authenticate to the server

configResetStat
void configResetStat()

Reset the stats returned by INFO

createSubscriber
RedisSubscriber createSubscriber()

Creates a RedisSubscriber instance for launching a pubsub listener

deleteAll
void deleteAll()

Deletes all keys from all databases.

echo
T echo(U data)

Echo the given string

getConfig
T getConfig(string parameter)

Get the value of a configuration parameter

getDatabase
RedisDatabase getDatabase(long index)

Returns a handle to the given database.

info
string info()

Get information and statistics about the server

lastSave
long lastSave()

Get the UNIX time stamp of the last successful save to disk

ping
void ping()

Ping the server

quit
void quit()

Close the connection

releaseUnusedConnections
void releaseUnusedConnections()

Release all connections that are not in use. Call before exiting the program to avoid relying on the GC to clean up the sockets.

save
void save()

Synchronously save the dataset to disk

setConfig
void setConfig(string parameter, T value)

Set a configuration parameter to the given value

shutdown
void shutdown()

Synchronously save the dataset to disk and then shut down the server

slaveOf
void slaveOf(string host, ushort port)

Make the server a slave of another instance, or promote it as master

Manifest constants

defaultPort
enum defaultPort;
Undocumented in source.

Properties

redisVersion
string redisVersion [@property getter]

Returns Redis version

Meta