refresh method

  1. @override
Future<void> refresh(
  1. String key
)
override

Refreshes a value in the cache based on its key, resetting its sliding expiration timeout (if any).

This does nothing if the key is not found.

Implementation

@override
Future<void> refresh(String key) async {
  // Access the entry to reset sliding expiration
  _cache.tryGetValue(key, (_) {});
}