newEntry method
CacheEntry
newEntry(})
override
Creates a new CacheEntry
with the provided ValueGenerator and seed
seed
: The seed for the ValueGeneratorkey
: The cache keyexpiryDuration
: The cache expiry durationcreationTime
: The cache creation time
Returns a fully initialized CacheEntry
Implementation
@override
CacheEntry newEntry(int seed,
{String? key, Duration? expiryDuration, DateTime? creationTime}) {
return CacheEntryBuilder(
key ?? 'cache_key_$seed',
generator.nextValue(seed),
creationTime ?? DateTime.now(),
expiryDuration ?? seed.minutes,
).build();
}