clear static method

Future<void> clear()

Clears all cache entries.

Implementation

static Future<void> clear() async {
  await _init();
  final keys = _prefs?.getKeys() ?? <String>{};
  for (final String key in keys) {
    if (key.startsWith('cache_')) {
      await _prefs?.remove(key);
    }
  }
}