Suggestion: explain why this is better than koa-conditional-get
ide opened this issue · comments
Reading the code I believe this middleware is better since it does a better job of figuring out if a response is cacheable. Would be good to explain that to people who are interested.
I just took a look at koa-etag and it looks like it does a couple of checks on its own so maybe koa-fresh doesn't do much more than koa-conditional-get...
+1 why are there two libraries in the koajs org that do the exact same thing in essentially the exact same manner? There is no reason for this repo to exist
yeah can we delete this?
aye i got confused too. @fengmk2 what do you think? maybe just deprecate it?
this project is dead, please use koa-conditional-get
instead
or
app.use((ctx, next) => {
return next().then(() => {
if (ctx.fresh) {
ctx.status = 304;
ctx.body = null;
}
});
})
👍