clearCacheForCategory method

Future<void> clearCacheForCategory(
  1. CacheCategory category
)

Invalidate cache for a specific category.

Implementation

Future<void> clearCacheForCategory(CacheCategory category) async {
  await _ensureInitialized();
  try {
    await _movieBox!.delete(category.value);
    await _timestampBox!.delete(category.value);
  } catch (e) {
    debugPrint('Error clearing cache for ${category.value}: $e');
    rethrow;
  }
}