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: '*'
});
-
Notifications
You must be signed in to change notification settings - Fork 0
Caching middleware for dobi servers
License
lessthan3/dobi-cache
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Caching middleware for dobi servers
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published