refresh method

  1. @override
Future<void> refresh(
  1. String key,
  2. Map<String, dynamic> value
)
override

Updates the data located at key.

Throws JsonCacheException to indicate operation failure.

Implementation

@override
Future<void> refresh(String key, Map<String, dynamic> value) async {
  try {
    await _wrapped.refresh(key, value);
  } on Exception catch (ex, st) {
    Error.throwWithStackTrace(
      JsonCacheException(
        extra: "Error refreshing cached data at index '$key'.",
        exception: ex,
      ),
      st,
    );
  }
}