CacheEntry class

The wrapper around the object that is added to the cache

Inheritance

Constructors

CacheEntry(String key, dynamic value, DateTime expiryTime, DateTime creationTime, {DateTime? accessTime, DateTime? updateTime, int? hitCount})

Properties

accessTime DateTime
Cache access time
getter/setter pairinherited
creationTime DateTime
Cache creation time
getter/setter pairinherited
expiryTime DateTime
Cache expiration time
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
hitCount int
Cache hitcount
getter/setter pairinherited
key String
The cache key
finalinherited
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stat CacheStat
Returns a CacheStat from this CacheEntry
getter/setter pair
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
updateTime DateTime
Cache update time
getter/setter pairinherited
value → dynamic
Returns the stored value
no setter
valueChanged bool
Returns true if the value was changed after retrieval from the store or if it was newly created
no setter

Methods

copyForUpdate(dynamic value, {String? key, DateTime? expiryTime, DateTime? creationTime, DateTime? accessTime, DateTime? updateTime, int? hitCount}) CacheEntry
Copies a CacheEntry
isExpired([DateTime? now]) bool
Checks if the cache entry is expired
inherited
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