CacheEntry<T> class

Wrapper around a cached value that tracks creation time for TTL checks.

Constructors

CacheEntry(T value, {required DateTime createdAt, Duration? ttl})

Properties

createdAt DateTime
When this entry was written.
final
hashCode int
The hash code for this object.
no setterinherited
isExpired bool
Whether this entry has expired based on its ttl.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
ttl Duration?
Optional time-to-live. If null, the entry never expires.
final
value → T
The cached value.
final

Methods

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