put<T> method
Implementation
Future<T> put<T>(
String name, {
bool? cached,
Iterable<Object?> keyProps = const [],
required Future<T> Function() callback,
}) async {
cached ??= false;
if (!cached) return callback();
final k = hashKey(T, name, keyProps);
final x = _db[k];
if (x is T) return x;
return _db[k] ??= await callback();
}