@redpill-paris/koa-cache-control

1.0.4 • Public • Published

koa-cache-control

html cache control for koajs

Install

  yarn add @redpill-paris/koa-cache-control

Configuration

Koa

const controlCache = require('@redpill-paris/koa-cache-control');

app.use(cacheControl([
    'no-cache'
]));

See html control cache parameters

Specific options

async getUser(ctx) {
    ...
    ctx.cacheControl = ['public', 'max-age=600'];
    ...
    ctx.response.status = 200;
}

Readme

Keywords

none

Package Sidebar

Install

npm i @redpill-paris/koa-cache-control

Weekly Downloads

0

Version

1.0.4

License

MIT

Unpacked Size

1.12 kB

Total Files

3

Last publish

Collaborators

  • olfamah
  • jalelm
  • alexandrelac
  • teva-redpill