CacheEntry class
The wrapper around the object that is added to the cache
Constructors
- CacheEntry.loaded(String key, DateTime creationTime, DateTime expiryTime, dynamic value, {DateTime? accessTime, DateTime? updateTime, int? hitCount})
- Creates a loaded CacheEntry
- CacheEntry.updated(CacheInfo info, dynamic value, DateTime updateTime, int hitCount, {DateTime? expiryTime})
- Creates an updated CacheEntry
Properties
- accessTime → DateTime
-
The access time getter
no setterinherited
- creationTime → DateTime
-
The creation time getter
no setterinherited
- expiryTime → DateTime
-
The expiry time getter
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hitCount → int
-
The hit count getter
no setter
- info → CacheInfo
-
The info
finalinherited
- key → String
-
The key getter
no setterinherited
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state → EntryState
-
The state getter
no setterinherited
- stringify → bool?
-
If set to
true
, the toString method will be overridden to output this instance's props.no setterinherited - updateTime → DateTime
-
The update time getter
no setterinherited
- value → dynamic
-
The value
finalinherited
Methods
-
isExpired(
[DateTime? now]) → bool - Checks if the cache entry is expired
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
updateInfo(
CacheInfo info) → void -
Updates a CacheEntry info
override
-
updateInfoFields(
{DateTime? expiryTime, int? hitCount, DateTime? accessTime, DateTime? updateTime}) → void -
Updates the Info fields
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited