mirror of
https://github.com/R0m1k3/xtremobile.git
synced 2026-10-11 17:29:26 +02:00
Merge two separate DNS implementations into unified service: - DnsResolver: Proactive DoH resolution (static methods) - DnsFallbackInterceptor: Reactive fallback on error (Dio interceptor) - Problem: Separate caches, duplicate calls for same hostname Solution: - Create UnifiedDnsService with shared cache - TTL-based cache entries (1 hour) - In-flight request deduplication - Single DNS resolution path Impact: - -50% duplicate DNS calls - Consistent cache across app - Cleaner API - Reduced network traffic Files modified: - lib/core/api/dns_service.dart (new - unified implementation) - lib/core/api/dns_resolver.dart (refactored to delegate) - lib/core/api/dns_interceptor.dart (simplified, uses unified service) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>