Optional
clientTag to append to library name that is sent to the Redis server
Optional
clientClient Side Caching configuration.
Enables Redis Servers and Clients to work together to cache results from commands sent to a server. The server will notify the client when cached results are no longer valid.
Note: Client Side Caching is only supported with RESP3.
Optional
clusterRedis cluster configuration. Use this when connecting to a Redis Cluster instead of a single Redis instance.
Optional
commandDefault command options to be applied to all commands executed through this client.
These options can be overridden on a per-command basis when calling specific commands.
Optional
commandsMaximum length of the client's internal command queue
Optional
credentialsProvides credentials for authentication. Can be set directly or will be created internally if username/password are provided instead. If both are supplied, this credentialsProvider takes precedence over username/password.
Optional
databaseRedis database number (see SELECT
command)
Optional
disableIf set to true, disables sending client identifier (user-agent like message) to the redis server
Optional
disableWhen true
, commands are rejected when the client is reconnecting.
When false
, commands are queued for execution after reconnection.
Optional
functionsOptional
modulesOptional
nameClient name (see CLIENT SETNAME
)
Optional
passwordACL password or the old "--requirepass" password
Optional
pingSend PING
command at interval (in ms).
Useful with Redis deployments that do not honor TCP Keep-Alive.
Optional
readonlyConnect in READONLY
mode
Optional
RESPSpecifies the Redis Serialization Protocol version to use. RESP2 is the default (value 2), while RESP3 (value 3) provides additional data types and features introduced in Redis 6.0.
Optional
scriptsOptional
socketSocket connection properties
Optional
unstableWhen set to true, enables commands that have unstable RESP3 implementations. When using RESP3 protocol, commands marked as having unstable RESP3 support will throw an error unless this flag is explicitly set to true. This primarily affects modules like Redis Search where response formats in RESP3 mode may change in future versions.
Optional
urlOptional
usernameACL username (see ACL guide)
Interface defining Redis options.