network_sanitizer 1.0.0
network_sanitizer: ^1.0.0 copied to clipboard
A powerful HTTP caching and request deduplication library for Flutter/Dart applications using Dio interceptor. Provides efficient network request optimization with configurable caching, automatic requ [...]
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.0 - 2025-06-03 #
Added #
- π Initial release of Network Sanitizer
- β HTTP request caching with configurable duration
- β Automatic request deduplication to prevent duplicate simultaneous requests
- β Force refresh functionality to invalidate cache on demand
- β Cross-platform storage support using Hive
- β Seamless Dio interceptor integration
- β Customizable cache manager interface for custom storage implementations
- β Smart cache key generation based on request parameters
- β Zero-configuration setup with sensible defaults
- β Support for all Flutter platforms (Android, iOS, Web, macOS, Windows, Linux)
- π± Complete example app demonstrating all features
- π Comprehensive documentation and API reference
Features #
- NetworkSanitizerInterceptor: Main interceptor class with configurable cache duration
- SanitizerCacheManager: Abstract interface for custom cache implementations
- HiveCacheManager: Default Hive-based cache storage implementation
- Request Key Generation: Automatic generation of unique cache keys
- Cache Invalidation: Support for force refresh via request options
- Request Deduplication: Prevents duplicate network calls for identical requests
Dependencies #
dio: ^5.8.0+1
- HTTP client integrationhive: ^2.2.3
- Cross-platform storagehive_flutter: ^1.1.0
- Flutter-specific Hive extensionspath_provider: ^2.1.4
- Platform-specific paths