copyWith method
Create a copy with updated fields
Implementation
CacheEntry copyWith({
dynamic data,
DateTime? timestamp,
DateTime? lastAccessTime,
int? accessCount,
int? sizeInBytes,
Duration? ttl,
}) {
return CacheEntry(
data: data ?? this.data,
timestamp: timestamp ?? this.timestamp,
lastAccessTime: lastAccessTime ?? this.lastAccessTime,
accessCount: accessCount ?? this.accessCount,
sizeInBytes: sizeInBytes ?? this.sizeInBytes,
ttl: ttl ?? this.ttl,
);
}