dobi-cache-2
TypeScript icon, indicating that this package has built-in type declarations

6.0.0 • Public • Published

USAGE

  const Cache = require('dobi-cache');
  const { cache, flushCache } = new Cache({
    disabled: false,
    keyPrefix: 'myKeyPrefix',
    redisUri: 'localhost'
  });


  app.get('/', cache('5 minutes'), (ctx) => {
    ctx.body = 'hello world'
  })

  app.get('/bar', cache({
    age: 300,
    query: ['name', 'title'],
  });

  app.get('/bar', cache({
    age: '5 minutes',
    query: '*'
  });

Readme

Keywords

Package Sidebar

Install

npm i dobi-cache-2

Homepage

www.dobi.io

Weekly Downloads

64

Version

6.0.0

License

none

Unpacked Size

43.6 MB

Total Files

748

Last publish

Collaborators

  • alexalmadav
  • bruno-albino
  • sterlbuck