llfbandit / dio_cache_interceptor

Dio HTTP cache interceptor with multiple stores respecting HTTP directives (ETag, Last-Modified, Cache-Control) with options.
https://pub.dev/packages/dio_cache_interceptor
120 stars 70 forks source link

Only hit cache if there is an error or no network #116

Closed MatyasK closed 1 year ago

MatyasK commented 1 year ago

I only need the cached data when the user device is offline, or our backend goes down. Every other secenario should get the data from backend and save it and return it. How can I set this up with library?

llfbandit commented 1 year ago

Yes, please read the docs.