Skip to content

jean-smaug/koache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Koache

js-standard-style

Koache is small middleware using node-cache to cache requests. Koache will cache each path of your application, so you can use it in combination of koa-router

const Koa = require("koa");
const cache = require("koache");

const app = new Koa();

// See node-cache documentation to see allowded options
app.use(cache({ stdTTL: 10 }));

app.use(async ctx => {
  ctx.body = "smaug";
});

app.listen(3001, () => console.log("listening..."));

About

Koa middleware for caching response, based on node-cache

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published