Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/phillipj/request-cache
Cache wrapper around the popular request.js module
https://github.com/phillipj/request-cache
Last synced: about 1 month ago
JSON representation
Cache wrapper around the popular request.js module
- Host: GitHub
- URL: https://github.com/phillipj/request-cache
- Owner: phillipj
- License: other
- Created: 2015-05-15T22:57:26.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-09-26T20:48:58.000Z (about 9 years ago)
- Last Synced: 2024-04-14T22:44:52.872Z (7 months ago)
- Language: JavaScript
- Size: 234 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# request-cache
[![Build Status](https://api.travis-ci.org/phillipj/request-cache.png?branch=master)](http://travis-ci.org/phillipj/request-cache)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)Cache wrapper around the popular request.js module.
## TL;DR
- Has the same API as [request](https://www.npmjs.com/package/request)
- Cache content based on response cache headers
- You control which version of `request` to use
- Follows [RFC7234](https://tools.ietf.org/html/rfc7234)## Usage
```js
var cache = require('request-cache')
var request = cache(require('request'))request('http://example.com', function(err, res, body){
console.log('Response from example.com', body)request('http://example.com', function(err, res, body){
console.log('Cached response from example.com', body)
})
})
```## Still very much work in progress!
# Contributing
request-cache is an **OPEN Open Source Project**. This means that:
> Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project.
See the [contribution guide](CONTRIBUTING.md) for more details.
# Contributors
Phillip JohnsenGitHub/phillipjTwitter/@phillipjohnsen
# License
Copyright © 2015 **request-cache** contributors.
**request-cache** is licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included `LICENSE.md` file for more details.