Comments (2)
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.
from dio-http-cache.
okay , did not think of that.thanks
from dio-http-cache.
Related Issues (20)
- if the internet is cut off and I display the data from the cache. I cannot manually delete
- Support on error callback
- Update the dependencies HOT 1
- Any example on cipher to encrypt cache? HOT 2
- at .wrapDatabaseException(.java:11)
- incompatible with newer dependencies HOT 2
- remove date when logout HOT 1
- Is this open source library?? HOT 1
- please add windows support HOT 1
- Json Serializable HOT 4
- Please add feature like getFileCached
- 建议
- Solving version fail HOT 6
- Change of copyright notice
- How I can disable this plugin for non Android / IOS / MACOS apps HOT 2
- [ Updated dependencies && Other pub.dev libs compatibility ] HOT 2
- Unhandled Exception: type 'Null' is not a subtype of type 'String' in type cast HOT 2
- Version Update HOT 6
- Updated the library to work with the latest DIO HOT 4
- Unhandled Exception: DatabaseException HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dio-http-cache.