clear method

Future<void> clear()

Clear all cached content

Implementation

Future<void> clear() async {
  _memoryCache.clear();

  if (_config.persistToDisk && _cacheFile != null) {
    try {
      if (await _cacheFile!.exists()) {
        await _cacheFile!.delete();
      }
    } catch (e) {
      if (kDebugMode) {
        print('Cache clear warning: $e');
      }
    }
  }
}