RedisCacheDriver class

A Redis-backed implementation of the CacheDriver interface.

Implemented types

Constructors

RedisCacheDriver({String host = 'localhost', int port = 6379, String? password})
Creates a new RedisCacheDriver instance.

Properties

hashCode → int
The hash code for this object.
no setterinherited
host → String
The Redis server host.
final
password → String?
The password for authentication, if any.
final
port → int
The Redis server port.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() → Future<void>
Closes the underlying Redis connection.
decrement(String key, [int value = 1]) → Future<int>
Decrements the value of an item in the cache.
override
flush() → Future<void>
Removes all items from the cache.
override
forget(String key) → Future<void>
Removes an item from the cache.
override
get(String key) → Future
Retrieves an item from the cache.
override
has(String key) → Future<bool>
Determines if an item exists in the cache.
override
increment(String key, [int value = 1]) → Future<int>
Increments the value of an item in the cache.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
put(String key, dynamic value, {Duration? ttl}) → Future<void>
Stores an item in the cache for a given duration.
override
toString() → String
A string representation of this object.
inherited

Operators

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