RedisProvider class final
Constructors
- RedisProvider({required String host, required int port, String? password})
- RedisProvider.fromEnvironment(Env env)
-
factory
Properties
- config ↔ CacheConfig
-
The
CacheConfigthat governs this provider's TTL policy and invalidation behaviour. Assigned byClientBuilderafter construction. Defaults toCacheConfig.defaultsso providers remain usable in tests without a full application wiring.getter/setter pairinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- logger → LoggerContract
-
no setter
- name → String
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- settings ↔ RedisSettings
-
latefinal
Methods
-
clear(
) → Future< void> -
dispose(
) → Future< void> -
get(
String? key) → Future< Map< String, dynamic> ?> -
getHealth(
) → Future< bool> -
getMany(
List< String> keys) → Future<List< Map< >String, dynamic> ?> -
getOrFail(
String key, {Exception onFail()?}) → Future< Map< String, dynamic> > -
has(
String key) → Future< bool> -
init(
) → Future< void> -
inspect(
) → Future< Map< String, dynamic> > -
length(
) → Future< int> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
put<
T> (String key, T object, {Duration? ttl}) → Future< void> -
Stores
objectunderkey. -
putMany<
T> (Map< String, T> objects, {Duration? ttl}) → Future<void> -
Stores all entries from
object. The optionalttlapplies uniformly to every entry; passnullto let the TTL policy decide per key,Duration.zerofor no expiry. -
remove(
String key) → Future< void> -
removeMany(
List< String> keys) → Future<void> -
toString(
) → String -
A string representation of this object.
inherited
-
whereKeyStartsWith(
String prefix) → Future< Map< String, dynamic> > -
whereKeyStartsWithOrFail(
String prefix, {Exception onFail()?}) → Future< Map< String, dynamic> >
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited