CacheEntry<V> class final

A cache entry that encapsulates a value with time-based expiration.

Each entry contains:

  • A value of type V
  • A time-to-live (TTL) duration
  • An internal creation timestamp

An entry is considered expired when the elapsed time since creation exceeds its TTL.

Constructors

CacheEntry(V value, Duration ttl)
The cache entry.

Properties

hashCode int
The hash code for this object.
no setterinherited
isExpired bool
Check if the cache entry is expired.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
ttl Duration
The time to live for the cache entry.
final
value → V
The value of the cache entry.
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