JSPM

  • Created
  • Published
  • Downloads 25
  • Score
    100M100P100Q63010F
  • License Apache-2.0

Route caching on RethinkDB

Package Exports

  • structure-cache-middleware

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (structure-cache-middleware) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

structure-cache-middleware

Route caching on RethinkDB

Usage

Cache a route

import cache from 'structure-cache-middleware'
app.get('/', cache(<TTL in seconds>), function (req, res)  { ... })

Invalidate all cached routes for an application

import {Cache} from 'structure-cache-middleware'
const cache = new Cache()
cache.invalidateApplication(applicationId)