Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leesiongchan/redux-effects-http-cache
https://github.com/leesiongchan/redux-effects-http-cache
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/leesiongchan/redux-effects-http-cache
- Owner: leesiongchan
- License: mit
- Created: 2016-04-06T13:14:00.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-05-18T01:37:14.000Z (over 8 years ago)
- Last Synced: 2024-11-15T23:43:55.309Z (about 2 months ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# redux-effects-http-cache
Cache HTTP requests to fetch requests to prevent duplicated requests.
## Installation
```
$ npm install redux-effects-http-cache
```## Usage
Add the http cache middleware to the effects stack before the `fetch` middleware.
```javascript
import effects from 'redux-effects';
import fetch from 'redux-effects-fetch';
import httpCache from 'redux-effects-http-cache';applyMiddleware(effects, httpCache, fetch)(createStore);
```