clearCache method

Future<void> clearCache()

Implementation

Future<void> clearCache() async {
  _cache.clear();
  // There is no built-in method to deleteAll from SharedPreferences, so:
  final keys = _cache.keys.toList(); // Make a copy of keys
  for (final key in keys) {
    await SecureStorage.clearSecureData(key);
  }
}