ExpiringCache<T> class

Inheritance

Constructors

ExpiringCache({required SourceCache<T> cache, required SourceCache<DateTime> cacheExpiryTimes, DateTime now()?})

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>
Empties the cache.
override
delete(String key) Future<void>
Removes the value from the cache.
override
multiDelete(Set<String> keys) Future<void>
Removes keys from the cache.
override
multiRead(Set<String> keys) Future<Map<String, T>>
Reads a set of values from the cache. Returns an empty set if no valid data is available.
override
multiWrite(Map<String, T> data, {Duration? ttl}) Future<void>
Writes a set of values to the cache.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read(String key) Future<T?>
Reads a value from the cache. Returns null if no valid data is available.
override
readAll() Future<Map<String, T>>
Reads all values from the cache. Returns an empty list if no valid data is available.
override
toString() String
A string representation of this object.
inherited
write(String key, T value, {Duration? ttl}) Future<void>
Writes a value to the cache.
override

Operators

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