clear method

  1. @override
Future<void> clear()
override

Frees up storage space by clearing cached data.

Throws JsonCacheException to indicate operation failure.

Implementation

@override
Future<void> clear() async {
  try {
    await _wrapped.clear();
  } on Exception catch (ex, st) {
    Error.throwWithStackTrace(
      JsonCacheException(
        extra: 'Error clearing cached data.',
        exception: ex,
      ),
      st,
    );
  }
}