src/middleware/cached.js
Showing 1 of 1 total issue
Function cached
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Open
export default async function cached (ctx, next) { await next(); const body = ctx.body; /* istanbul ignore if */ if (!body || ctx.response.get('ETag') || ctx.state.nocache) return;
- Read upRead up
- Create a ticketCreate a ticket