From ee97e29f72f809d87e4b3680dd8ff25e53dd9b92 Mon Sep 17 00:00:00 2001 From: GitHub Copilot Date: Thu, 26 Mar 2026 10:48:56 +0100 Subject: [PATCH] fix(cache): remove unused dio_cache_interceptor_hive_store import and simplify caching setup --- lib/features/iptv/services/xtream_service.dart | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/features/iptv/services/xtream_service.dart b/lib/features/iptv/services/xtream_service.dart index 8c6c931..1e513d7 100644 --- a/lib/features/iptv/services/xtream_service.dart +++ b/lib/features/iptv/services/xtream_service.dart @@ -2,7 +2,6 @@ import 'dart:convert'; import 'dart:html' as html; import 'package:dio/dio.dart'; import 'package:dio_cache_interceptor/dio_cache_interceptor.dart'; -import 'package:dio_cache_interceptor_hive_store/dio_cache_interceptor_hive_store.dart'; import 'package:flutter/foundation.dart'; import '../../../core/models/playlist_config.dart'; import '../../../core/models/iptv_models.dart'; @@ -34,9 +33,9 @@ class XtreamService { ); // Setup caching for API responses - // Use MemCacheStore on Web to avoid path errors + // Use MemCacheStore for in-memory caching _cacheOptions = CacheOptions( - store: kIsWeb ? MemCacheStore() : HiveCacheStore('./cache'), + store: MemCacheStore(), policy: CachePolicy.forceCache, // Prioritize local cache maxStale: const Duration(hours: 1), // Increase to 1h for stability priority: CachePriority.high,