Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/leesiongchan/redux-effects-http-cache


https://github.com/leesiongchan/redux-effects-http-cache

Last synced: about 2 months ago
JSON representation

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);
```