offline_first_cache 0.0.4 copy "offline_first_cache: ^0.0.4" to clipboard
offline_first_cache: ^0.0.4 copied to clipboard

An offline-first HTTP client for Flutter/Dart with request queuing, GET caching (stale-while-revalidate, tag-based invalidation), and a built-in Queue Inspector UI.

0.0.4 #

  • True Least-Recently-Used (LRU) Cache Eviction: Optimized caching by replacing single-deletion with a true LRU algorithm that sorts and clears least-recently-accessed items when exceeding size capacity.
  • Custom Pluggable Retry Policies: Added support for pluggable OfflineRetryPolicy strategies, allowing custom retry decisions (e.g. dynamic status checks, permanent client error handling) rather than hardcoded rules.
  • Optimistic UI Merging Helper: Added the getPendingMutationsForPath helper to query and synchronize pending queued mutations (POST/PUT/PATCH/DELETE) directly with local widgets for instant UI updates.
  • Modernized Package Structure: Restructured package assets, moving example components to a dedicated compliant example/ folder, ensuring a 100/100 pub points score on pub.dev.
  • Interceptor & Queue Reliability Fixes: Fixed deep interceptor-ordering issues in integration tests using network adapter-based mocks, and resolved recursive queueing race conditions during retries.

0.0.3 #

  • Initial release of offline_first_cache.
  • Added OfflineHttpClient wrapper on top of Dio and Hive.
  • Supported offline GET request caching with configurable TTL, tag-based invalidation, and stale-while-revalidate.
  • Supported offline request queueing (POST, PUT, DELETE, PATCH) with priority execution, exponential backoff with full jitter, and deduplication.
  • Supported Dead Letter Queue (DLQ) for failed retries.
  • Added optional secure storage-based AES encryption for local boxes.
  • Included a built-in QueueInspector widget to visually debug and manage the request and dead-letter queues.
5
likes
0
points
182
downloads

Publisher

unverified uploader

Weekly Downloads

An offline-first HTTP client for Flutter/Dart with request queuing, GET caching (stale-while-revalidate, tag-based invalidation), and a built-in Queue Inspector UI.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

connectivity_plus, dio, flutter, flutter_secure_storage, hive, hive_flutter, uuid

More

Packages that depend on offline_first_cache