RedisClient class

Redis client wrapper

Implemented types

Constructors

RedisClient(String _host, {int port = 6379, String? password, int database = 0})

Properties

client → Command
Get the underlying Redis command client
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() Future<void>
Close the connection
override
connect() Future<void>
Connect to Redis
override
delete(String key) Future<int>
Delete a key
override
exists(String key) Future<bool>
Check if key exists
override
expire(String key, Duration ttl) Future<void>
Set expiration for a key
override
get(String key) Future<String?>
Get a value by key
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sendCommand(List command) Future
Execute a custom command
override
set(String key, String value, {Duration? ttl}) Future<void>
Set a key-value pair
override
toString() String
A string representation of this object.
inherited
ttl(String key) Future<int>
Get TTL for a key
override

Operators

operator ==(Object other) bool
The equality operator.
inherited