CacheManager<T> class
final
A generic, in-memory cache with optional time-based expiration.
Constructors
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
-
cache(
String key, T value, {Duration? cacheDuration}) → void -
Caches a
value
with a givenkey
. -
get(
String? key) → T? - Retrieves an item from the cache.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
String? key) → T? - Syntactic sugar for getting a cached item using map-like access.