flutter_async_cache 0.0.3 copy "flutter_async_cache: ^0.0.3" to clipboard
flutter_async_cache: ^0.0.3 copied to clipboard

A smart caching system for API calls with automatic refresh, offline support, and cache invalidation

Changelog #

All notable changes to the flutter_async_cache package will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

0.0.3 - 2024-12-19 #

Fixed #

  • Code Quality: Fixed all linting issues for perfect static analysis score
  • Library Documentation: Added proper library declaration to exceptions.dart
  • Code Style: Added braces to all if statements for better readability and consistency
  • Static Analysis: Achieved 50/50 points with no warnings, errors, or linting issues

Technical Improvements #

  • Linting Compliance: All code now follows strict linting rules
  • Code Consistency: Improved code style consistency across all files
  • Documentation: Enhanced library-level documentation structure

0.0.2 - 2024-12-19 #

Fixed #

  • Platform Support: Removed plugin configuration to fix platform support warnings
  • WASM Compatibility: Removed unused dart:io and dart:math imports for better web compatibility
  • Dependencies: Removed unused path_provider dependency
  • Code Quality: Fixed all static analysis warnings and linting issues
  • Package Structure: Simplified to pure Dart package without platform-specific code

Technical Improvements #

  • Static Analysis: All code now passes flutter analyze with no warnings or errors
  • Cross-Platform: Improved compatibility across all supported platforms
  • Web Support: Better WASM compatibility for web applications
  • Dependency Management: Cleaner dependency tree with only necessary packages

0.0.1 - 2024-12-19 #

Added #

  • Initial release of flutter_async_cache package

  • Core Features:

    • Smart caching system for API calls with automatic refresh
    • Offline support with network connectivity monitoring
    • Cache invalidation using pattern-based matching
    • Multiple eviction strategies (LRU, LFU, FIFO, Random, Time-based)
    • Persistent storage using SharedPreferences
    • Background refresh capabilities
    • Comprehensive error handling with custom exceptions
  • Cache Management:

    • CacheManager class for main cache operations
    • CacheEntry class for individual cache items with metadata
    • CacheConfig class for flexible configuration options
    • Pre-configured cache configurations for different use cases
  • Eviction Strategies:

    • Least Recently Used (LRU)
    • Least Frequently Used (LFU)
    • First In First Out (FIFO)
    • Random eviction
    • Time-based eviction
  • Network Connectivity:

    • NetworkConnectivity class for monitoring network status
    • Automatic offline mode detection
    • Connectivity change notifications
  • Error Handling:

    • CacheException base class
    • CacheEntryNotFoundException for missing entries
    • CacheFullException for capacity issues
    • NoNetworkException for connectivity issues
    • CacheExpiredException for expired entries
  • Statistics and Monitoring:

    • Cache statistics (hit rate, miss rate, size, entry count)
    • Cache events stream for monitoring operations
    • Performance metrics tracking
  • Testing:

    • Comprehensive unit tests for all major components
    • Test coverage for cache operations, eviction strategies, and error handling
  • Documentation:

    • Complete API documentation
    • Usage examples and best practices
    • Configuration guide
    • Example Flutter application
  • Dependencies:

    • shared_preferences: ^2.0.0 for persistent storage
    • connectivity_plus: ^6.0.0 for network monitoring
    • http: ^1.0.0 for HTTP requests (example usage)

Technical Details #

  • Platform Support: Android, iOS, Web, Windows, macOS, Linux
  • Dart SDK: >=3.0.0 <4.0.0
  • Flutter SDK: >=3.0.0
  • License: MIT

Breaking Changes #

  • None (initial release)

Deprecations #

  • None (initial release)

[Unreleased] #

Planned Features #

  • Cache compression for large entries
  • Cache encryption for sensitive data
  • Distributed caching support
  • Cache warming strategies
  • Advanced analytics and reporting
  • Custom serialization formats
  • Cache migration tools
3
likes
160
points
47
downloads

Publisher

verified publisherbechattaoui.dev

Weekly Downloads

A smart caching system for API calls with automatic refresh, offline support, and cache invalidation

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

connectivity_plus, flutter, http, shared_preferences

More

Packages that depend on flutter_async_cache