0.0.2 • Published 6 years ago

@repit/q-cache v0.0.2

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

Repit Q-Cache

R/Q Middleware for short-term caching in AWS Lambda.

About

This module is a wrapper for @repit/lambda-cache.

Installation

$ npm install @repit/q-cache --save

Usage

'use strict'

const q = require('@repit/q')()
const cache = require('@repit/q-cache')

q(cache({
  // Specify if cache should be invalidated.
  invalidate: true, // Default: true

  // Set a custom cache key.
  key: 'cache' // Default: 'cache'
}))

q((req, res) => {
  req.cache // The Cache object.
  res.cache // The Cache object.
})

exports.handler = q.handler

License

MIT

0.0.2

6 years ago

0.0.1

6 years ago