CacheEntryMetadata class

Cache entry metadata

Constructors

CacheEntryMetadata({required String key, required DateTime createdAt, required DateTime lastAccessedAt, DateTime? expiresAt, required int size, String? contentType, Map<String, dynamic> additionalMetadata = const {}})
Creates a new CacheEntryMetadata
CacheEntryMetadata.fromJson(Map<String, dynamic> json)
Creates a CacheEntryMetadata from JSON
factory

Properties

additionalMetadata → Map<String, dynamic>
Additional metadata
final
contentType → String?
The content type of the entry
final
createdAt → DateTime
The time when the entry was created
final
expiresAt → DateTime?
The time when the entry expires
final
hashCode → int
The hash code for this object.
no setterinherited
isExpired → bool
Checks if the entry is expired
no setter
key → String
The key of the cache entry
final
lastAccessedAt ↔ DateTime
The time when the entry was last accessed
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
size → int
The size of the entry in bytes
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Converts the metadata to JSON
toString() → String
A string representation of this object.
inherited
updateLastAccessedAt() → void
Updates the last accessed time

Operators

operator ==(Object other) → bool
The equality operator.
inherited