RedisCache class

Redis-based cache implementation

Constructors

RedisCache(RedisClient _client)

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() Future<void>
Clear all cache (use with caution!)
expire(String key, Duration ttl) Future<void>
Set expiration for a key
get<T>(String key) Future<T?>
Get a value from cache
getMany<T>(List<String> keys) Future<Map<String, T?>>
Get multiple values
has(String key) Future<bool>
Check if key exists
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
put(String key, dynamic value, {Duration? ttl}) Future<void>
Set a value in cache
putMany(Map<String, dynamic> values, {Duration? ttl}) Future<void>
Set multiple values
remove(String key) Future<void>
Remove a key from cache
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