IRedisClient class abstract
Abstract interface for Redis clients Allows for both real and fake implementations
Constructors
Properties
- client → dynamic
-
Get the underlying Redis command client
no setter
- 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
-
connect(
) → Future< void> - Connect to Redis
-
delete(
String key) → Future< int> - Delete a key
-
exists(
String key) → Future< bool> - Check if key exists
-
expire(
String key, Duration ttl) → Future< void> - Set expiration for a key
-
get(
String key) → Future< String?> - Get a value by key
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sendCommand(
List command) → Future - Execute a custom command
-
set(
String key, String value, {Duration? ttl}) → Future< void> - Set a key-value pair
-
toString(
) → String -
A string representation of this object.
inherited
-
ttl(
String key) → Future< int> - Get TTL for a key
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited