Skip to content

Commit

Permalink
Dont await to write cache in disk to respond to client
Browse files Browse the repository at this point in the history
  • Loading branch information
filafb committed Oct 16, 2023
1 parent 99186f4 commit 3901796
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/HttpClient/middlewares/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down

0 comments on commit 3901796

Please sign in to comment.