You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP

dobi-cache-2

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
d

dobi-cache-2

Dobi.io Caching Middleware

6.0.0
latest
74

Supply Chain Security

100

Vulnerability

76

Quality

81

Maintenance

100

License

Version published
Maintainers
0
Created
Issues
20

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: '*'
  });

FAQs

Package last updated on 22 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts