mirror of
https://github.com/directus/directus.git
synced 2026-02-04 07:25:01 -05:00
Add response middleware and cache
This commit is contained in:
6
api/src/utils/get-cache-key.ts
Normal file
6
api/src/utils/get-cache-key.ts
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user