fix: Add cache fix for request Usage

Added cache: 'no-store' parameter to fetch to avoid caching issue in non-Vercel deployment environment(ref: https://beta.nextjs.org/docs/data-fetching/fetching#dynamic-data-fetching)
This commit is contained in:
ガオガオ
2023-04-13 01:27:11 +08:00
parent 8da581695f
commit d2ee1bd212
4 changed files with 20 additions and 8 deletions

View File

@@ -68,7 +68,7 @@ export const useUpdateStore = create<UpdateStore>()(
}
},
async updateUsage(force = false) {
async updateUsage(force: boolean = false) {
const overOneMinute = Date.now() - get().lastUpdateUsage >= ONE_MINUTE;
if (!overOneMinute && !force) return;