Comments (3)
It solely depends on the age of the stored data.
If you set your expiration to one hour and if your data for the endpoint you're trying to reach is two hours old, it will be considered as stale.
So, if you have some connectivity, it will refresh your data and if you don't, it will return the stale one.
from apipeline.
It doesnt update cache with this settings if i have connectivity
const API_OPTIONS = {
fetchMethod: fetch,
domains: { default: 'http://demo4345133.mockable.io' },
prefixes: {default: '/spica'},
debugAPI: true,
printNetworkRequests: true,
};
const API_SERVICES = {
auth: {
method: 'POST',
path: 'auth',
rawData: true,
},
getStorageDefs: {
method: 'POST',
path: 'storage-defs',
rawData: true,
expiration: 5 * 60 * 1000
},
};
const apiPipeline = new APIpeline(API_OPTIONS, API_SERVICES, AsyncStorage);
from apipeline.
Up @Exilz
from apipeline.
Related Issues (17)
- How to Set Expiration Time on specific requests HOT 5
- How to implement Promise.all() in offlineapi HOT 2
- Fetch both headers at data in the same request HOT 4
- How to post raw data as JSON HOT 2
- Do you support HTTP/2 PUSH ?
- add retry feature HOT 3
- Graphql support HOT 1
- app is crash when open HOT 2
- Add PATCH HTTP method HOT 3
- how to apply global headers? HOT 2
- Impossible to add data in body in middleware.
- How to know if cache is returned
- json() undefined when rawData is true HOT 1
- updating cache on referch with disableCache: true
- Fetching any kind of data, not just JSON HOT 2
- Process responses through middlewares HOT 11
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 apipeline.