set<T> method
Store a value under key with an optional ttl.
If ttl is not provided, defaultTtl is used.
Implementation
void set<T>(String key, T value, {Duration? ttl}) {
final entry = CacheEntry<T>(
value,
createdAt: DateTime.now(),
ttl: ttl ?? defaultTtl,
);
_store.set(key, entry);
_logger.debug(
'CacheManager: cached "$key" (ttl: ${entry.ttl?.inSeconds}s)',
);
}