From c3a524748e29e54b682556b2e8eddf2756f3b5a9 Mon Sep 17 00:00:00 2001 From: mbaharip <62494292+mbahArip@users.noreply.github.com> Date: Wed, 29 May 2024 15:55:39 +0700 Subject: [PATCH] Fix: fetch has revalidate of 1 hour instead of 1 minutes like the route cache --- src/utils/gdriveInstance.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/utils/gdriveInstance.ts b/src/utils/gdriveInstance.ts index 35b252c..2f31ad6 100644 --- a/src/utils/gdriveInstance.ts +++ b/src/utils/gdriveInstance.ts @@ -43,18 +43,17 @@ if (!gdrive) { gdrive = google.drive({ version: "v3", auth: serviceAccountAuth, - fetchImplementation: (url, init) => - fetch(url, { - ...init, - next: { - revalidate: 3600, - }, - }), + fetchImplementation: (url, init) => fetch(url, init), }); } export const gdriveNoCache = google.drive({ version: "v3", auth: serviceAccountAuth, + fetchImplementation: (url, init) => + fetch(url, { + ...init, + cache: "no-store", + }), }); export default gdrive as drive_v3.Drive;