remove method

Future<void> remove()

Implementation

Future<void> remove() async {
  // Close writer first to ensure file is not in use
  await close();

  // Clean up both temp and actual file
  if (await _tempFile.exists()) {
    try {
      await _tempFile.delete();
    } catch (_) {}
  }

  if (await _file.exists()) {
    try {
      await _file.delete();
    } catch (e) {
      httpCacheLogger.warning('Error deleting cache blob file', e);
    }
  }
}