From f018ef1c24810f00cb379d5a353f7346a5571d89 Mon Sep 17 00:00:00 2001 From: Tim Raderschad Date: Wed, 11 Sep 2024 18:29:37 +0200 Subject: [PATCH] fix(web): increase counter cache time --- apps/web/src/server/trpc/router/events.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/web/src/server/trpc/router/events.ts b/apps/web/src/server/trpc/router/events.ts index 2f12f8bd..db6f2295 100644 --- a/apps/web/src/server/trpc/router/events.ts +++ b/apps/web/src/server/trpc/router/events.ts @@ -326,7 +326,7 @@ export const eventRouter = router({ )), }; }), - getEventCount: publicProcedure.query(async ({ ctx }) => { + getEventCount: publicProcedure.query(async () => { return await getTotalEventCount(); }), }); @@ -340,6 +340,6 @@ const getTotalEventCount = memoize( return eventCount + apiRequestCount; }, { - maxAge: 1000 * 60, + maxAge: 1000 * 60 * 60, } );