get method
Returns the cached value, loading and caching it on a miss. Audited: 2026-06-12 11:26 EDT
Implementation
Future<V?> get(K key) async {
if (_cache.containsKey(key)) return _cache[key];
final V? loaded = await _load(key);
if (loaded != null) _cache[key] = loaded;
return loaded;
}