flutter_app_cache_manager 1.0.0
flutter_app_cache_manager: ^1.0.0 copied to clipboard
A comprehensive Flutter cache manager package to cache images, videos, and other files.
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 #
BREAKING CHANGES #
- Initialization Pattern: Removed
initialize()
method in favor of factory constructor- Before:
final manager = FlutterCacheManagerImpl(); await manager.initialize(config);
- After:
final manager = await FlutterCacheManagerImpl.create(config);
- Before:
- Type Safety: All data models now use
parseDefault()
for consistent safe type parsing
Added #
Core Features
- Complete cache manager implementation using
flutter_cache_manager
as the underlying engine - Clean Architecture design with abstract interfaces for dependency inversion
- Type-safe implementation using
flutter_shared_utilities
for safe type parsing - Multi-file type support for images, videos, audio, documents, archives, and general files
Cache Management
- Comprehensive cache operations: store, retrieve, delete, exists, clear, refresh
- Batch operations: storeMultiple, retrieveMultiple, deleteMultiple for efficiency
- Cache configuration models with factory methods for different file types
- Priority system: Critical, high, normal, and low priority levels for cache entries
Advanced Capabilities
- Real-time progress monitoring with stream-based download progress tracking
- Cache event streaming for comprehensive monitoring of cache operations
- Cache statistics and analytics: hit rates, usage metrics, performance tracking
- Integrity validation: checksum-based corruption detection and automatic repair
- Smart cleanup policies: automatic maintenance with configurable cleanup strategies
Configuration Options
- File type specific configurations optimized for different content types
- Network management features: WiFi-only mode, retry policies, configurable timeouts
- Storage control: size limits, entry limits, compression, and encryption options
- Flexible TTL policies: per-entry or global time-to-live settings
- Custom expiration policies: TTL, LRU, FIFO, and custom expiration strategies
Models and Data Structures
- CacheEntryModel: Comprehensive cache entry representation with metadata
- CacheConfigurationModel: Flexible configuration with type-safe parsing
- Complete enum system: File types, priorities, policies, and event types
- Custom exception hierarchy for specific error scenarios
Interface Design
- CacheManagerInterface: Complete abstract interface defining all operations
- FlutterCacheManagerImpl: Concrete implementation with comprehensive features
Dependencies #
flutter_cache_manager: ^3.3.1
- Core caching functionalityflutter_shared_utilities: ^1.0.0
- Safe type parsing utilitiescached_network_image: ^3.3.1
- Image caching integrationpath_provider: ^2.1.2
- File system path accessdio: ^5.4.2+1
- HTTP client for downloadsconnectivity_plus: ^6.0.3
- Network connectivity monitoringequatable: ^2.0.5
- Value equality comparisonsshared_preferences: ^2.2.2
- Local preference storagemime: ^1.0.5
- MIME type detectionrxdart: ^0.27.7
- Reactive extensionscrypto: ^3.0.3
- Cryptographic operations
Documentation #
- Comprehensive README with usage examples and integration guides
- Detailed API documentation with inline code comments
- Example application demonstrating all package features
- Architecture documentation explaining clean architecture implementation
[Unreleased] #
Planned Features #
- Background sync capabilities
- Cache warming strategies
- Advanced compression algorithms
- Multi-device cache synchronization
- Cache analytics dashboard
- Performance profiling tools