set method
void
set(})
Inserts or updates a record.
Implementation
void set(
String key,
T data, {
DateTime? lastModified,
String? etag,
List<String> cacheTags = const [],
}) {
_store[key] = _MemoryRecord<T>(
data: data,
lastModified: lastModified ?? DateTime.now().toUtc(),
etag:
etag ??
'w/"${data.hashCode}-${DateTime.now().millisecondsSinceEpoch}"',
cacheTags: cacheTags,
isGone: false,
);
}