QueryCacheEntry<T> class

A cached record containing fetched data, timestamps, and TTL settings.

Tracks the freshness and eviction lifecycle of cached query results managed by BloomData.

Constructors

QueryCacheEntry({required List key, T? data, required DateTime updatedAt, Duration staleTime = const Duration(minutes: 5), Duration cacheTime = const Duration(minutes: 30), bool isStale = false})
Creates a QueryCacheEntry recording key, data, and freshness parameters.

Properties

cacheTime ↔ Duration
Duration after updatedAt after which data is completely expired and evicted from use.
getter/setter pair
data ↔ T?
The cached data payload, or null if uninitialized.
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
isExpired → bool
Whether the entry has exceeded its cacheTime TTL relative to DateTime.now().
no setter
isStale ↔ bool
Whether this entry has been explicitly marked as stale via invalidation.
getter/setter pair
key → List
The structured query cache key identifying this record.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
shouldRevalidate → bool
Whether this entry is flagged as isStale or has exceeded its staleTime duration.
no setter
staleTime ↔ Duration
Duration after updatedAt during which data is considered fresh before revalidation is needed.
getter/setter pair
updatedAt ↔ DateTime
The timestamp when this record was last successfully fetched or updated.
getter/setter pair

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