Reqache is a library that caches get request data specifically for apis that have strict call limits
npm install reqache
- fetch(url, options)
- options is a js object that contains two properties : responseType and env
- env is the current enviornment you are running in. If you are in a production env, then reqache will not cache.
- prod or dev are the expected values for env
- responseType is the type of response you are expecting json, text etc..
- env is the current enviornment you are running in. If you are in a production env, then reqache will not cache.
- options is a js object that contains two properties : responseType and env
import {fetch} from "reqache"
fetch(url)
.then(data=>console.log(data));
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.