From 082bdff1e3524a50319b62db34009676b9b49200 Mon Sep 17 00:00:00 2001 From: ItsFlash10 Date: Mon, 9 Sep 2024 02:52:28 +0530 Subject: [PATCH] fixed cache issue --- apps/web/components/utils.tsx | 4 ++++ apps/web/screens/Admin.tsx | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/apps/web/components/utils.tsx b/apps/web/components/utils.tsx index 66890884..bdc0837f 100644 --- a/apps/web/components/utils.tsx +++ b/apps/web/components/utils.tsx @@ -295,6 +295,10 @@ export async function updateTrack( }); }); } + + await cache.evict("getAllTracks", []); + await getAllTracks(); + return track; } catch (e) { console.log(e); diff --git a/apps/web/screens/Admin.tsx b/apps/web/screens/Admin.tsx index 418c128b..5a40a5e1 100644 --- a/apps/web/screens/Admin.tsx +++ b/apps/web/screens/Admin.tsx @@ -24,6 +24,10 @@ export const Admin = async () => { }); return (
+

+ Note: Changes will be reflected at the Client FE but here in Admin you'll have to refresh in order to see the + changes +