From 39017969845c150bcfe02370b5035ba4025c9688 Mon Sep 17 00:00:00 2001 From: Filadelfo Date: Mon, 16 Oct 2023 10:31:31 -0300 Subject: [PATCH] Dont await to write cache in disk to respond to client --- src/HttpClient/middlewares/cache.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/HttpClient/middlewares/cache.ts b/src/HttpClient/middlewares/cache.ts index 2d36e40c..01eb9d92 100644 --- a/src/HttpClient/middlewares/cache.ts +++ b/src/HttpClient/middlewares/cache.ts @@ -199,7 +199,7 @@ export const cacheMiddleware = ({ type, storage }: CacheOptions) => { : data const expiration = Date.now() + (maxAge - currentAge) * 1000 - await storage.set(setKey, { + storage.set(setKey, { etag, expiration, response: {data: cacheableData, headers, status},