dio_mcache 0.1.6 copy "dio_mcache: ^0.1.6" to clipboard
dio_mcache: ^0.1.6 copied to clipboard

HTTP cache interceptor for Dio built on mcache_dart. Per-request cache policies, tag invalidation, deduplication, conditional requests, and stale-while-revalidate.

0.1.6 #

  • Fix: a request no longer coalesces onto a STALE in-flight dedup entry. If the original request gets stuck (the app is suspended mid-flight, or a request never fires a response/error callback), its dedup entry holds a completer that may never complete — a later identical request would await it forever (an infinite spinner on re-navigation "after a while"). Entries older than the new DioCacheOptions.dedupMaxAge (default 30s) are dropped and a FRESH request is issued instead. Regression test added.

0.1.5 #

  • Fix: a cache HIT no longer leaks its deduplication entry. A cache hit resolves via handler.resolve and never reaches onResponse (where the dedup entry is cleared), so with enableDeduplication: true the entry registered in onRequest was orphaned with an uncompleted completer — the NEXT identical request awaited it forever (an infinite spinner on a screen re-opened within the TTL). The cache-hit path now resolves the dedup entry with the cached response. Regression test added.

0.1.4 #

  • Add dartdoc documentation to all public API (20%+ coverage)
  • Shorten pubspec description for pub.dev scoring
  • Add example/ directory with usage sample
  • Bump mcache_dart dependency to ^0.1.9

0.1.3 #

  • Align README badges with mcache_dart standard (dynamic pub.dev, CI, Publish, Stars, License)

0.1.2 #

  • Rename package to dio_mcache for pub.dev uniqueness
  • Configure OIDC automated publishing via GitHub Actions

0.1.1 #

  • Fix pub.dev topics (max 5)

0.1.0 #

  • Initial release: dio_mcache
  • CachePolicy system with named policies and per-request override
  • CacheControl: 5 modes (normal, forceRefresh, onlyCache, noCache, noStore)
  • Tag-based cache invalidation and path-pattern invalidation
  • Request deduplication (prevent concurrent identical network calls)
  • Conditional requests (ETag/If-None-Match 304 support)
  • Stale-while-revalidate (serve stale + background refresh)
  • Custom serialization/deserialization hooks per-request
  • Auto-invalidation on POST/PUT/DELETE mutations
  • Response filtering callbacks (shouldCacheResponse/shouldCacheRequest)
  • Builds on mcache_dart ^0.1.8
  • 34 integration tests against real HTTP server
0
likes
160
points
195
downloads

Documentation

API reference

Publisher

verified publisherpurplesoft.io

Weekly Downloads

HTTP cache interceptor for Dio built on mcache_dart. Per-request cache policies, tag invalidation, deduplication, conditional requests, and stale-while-revalidate.

Repository (GitHub)
View/report issues

Topics

#dio #cache #caching #http #flutter

License

AGPL-3.0 (license)

Dependencies

dio, mcache_dart

More

Packages that depend on dio_mcache