mirror of
https://github.com/Nezumi-2711/next-gdrive-index.git
synced 2026-09-22 13:38:38 +00:00
Fix: fetch has revalidate of 1 hour instead of 1 minutes like the route cache
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user