saveForever<T> method
Saves a value in the cache without an expiration time.
Implementation
Future<T> saveForever<T>(String key, Future<T> Function() callback) async {
if (_store.containsKey(key)) {
return _store[key]!.value as T;
}
final T value = await callback();
_store[key] = _CacheEntry(value: value);
return value;
}