Add response middleware and cache

This commit is contained in:
rijkvanzanten
2020-09-08 18:28:23 -04:00
parent 266c07fde7
commit b19ffd960b
27 changed files with 493 additions and 367 deletions

View File

@@ -0,0 +1,6 @@
import { Request } from "express";
export function getCacheKey(req: Request) {
const key = `${req.accountability?.user || 'null'}-${req.originalUrl}-${JSON.stringify(req.sanitizedQuery)}`;
return key;
}