Closed thangmam closed 4 years ago
For the time being you can add a custom field say "cached":true in "extra" for each dio request using an interceptor i.e onRequest & for each response i.e onResponse in the interceptor you can update the same field in extra as false.
When the response is from the local cache your onResponse is not called giving you "cached" as true. This is the quickest way I found so far.
okay , did not think of that.thanks
Hi , thanks for the library.I wanted to ask if its possible to know if the response is cached data or not.This way i will be able to notify UI that the data is cached and may not be updated.Thanks