1.0.0 • Published 8 years ago
moola-redis v1.0.0
Install
$ npm install moola-redis
# OR
$ yarn add moola-redisUsage
const express = require('express')
const app = express()
const cache = require('moola-redis')
app.use(cache({duration: 30, redis: {port: 6379}}))
app.get('/', (req, res) => {
res.send({test: true})
})
app.listen(8000)API
cache(options: Object)
Creates cache middleware with options:
redis: Object- Standard configuration options for redis clientduration: Number- Amount in seconds to cache for
Contributing
Contributions are welcome!
- Fork it.
- Create your feature branch:
git checkout -b my-new-feature - Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin my-new-feature - Submit a pull request :D
Or open up a issue.
License
Licensed under the MIT License.
1.0.0
8 years ago