koa-no-cache

2.0.0 • Public • Published

NPM version Build status Test coverage License Dependency status

koa-no-cache

no cache for koa apps

example

Adding no cache header on some paths or types

const noCache = require('koa-no-cache')
const Koa = require('koa')
const app = new Koa()
 
app.use(noCache({
  paths: ['/users/(.*)'],
  types: ['manifest']
}))

Adding no cache header globally

const noCache = require('koa-no-cache')
const Koa = require('koa')
const app = new Koa()
 
app.use(noCache({
  global: true
}))

License

MIT

Package Sidebar

Install

npm i koa-no-cache

Weekly Downloads

210

Version

2.0.0

License

MIT

Last publish

Collaborators

  • coderhaoxin
  • haoxins