mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-30 21:36:06 +08:00
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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user