diff --git a/src/backend/utils/inet/downloader/index.ts b/src/backend/utils/inet/downloader/index.ts index 9f58fd34ec..ad09753f94 100644 --- a/src/backend/utils/inet/downloader/index.ts +++ b/src/backend/utils/inet/downloader/index.ts @@ -51,8 +51,7 @@ async function downloadFile( if (options.maxCache && options.writeToFile) { const stats = await stat(options.writeToFile).catch(() => null) if (stats) { - if (stats.birthtime.valueOf() + options.maxCache * 1000 >= Date.now()) { - console.log('Returning cached value for', url) + if (stats.mtimeMs + options.maxCache * 1000 >= Date.now()) { switch (options.axiosConfig?.responseType) { case 'text': return readFile(options.writeToFile, 'utf-8') diff --git a/src/backend/utils/systeminfo/gpu/pci_ids.ts b/src/backend/utils/systeminfo/gpu/pci_ids.ts index 366056459b..b1c5e7c3eb 100644 --- a/src/backend/utils/systeminfo/gpu/pci_ids.ts +++ b/src/backend/utils/systeminfo/gpu/pci_ids.ts @@ -33,7 +33,7 @@ async function getPicIds(): Promise { responseType: 'text' }, writeToFile: path.join(toolsPath, 'pci.ids'), - maxCache: 7 * DAYS + maxCache: 30 * DAYS }).catch((error) => error as AxiosError) if (axios.isAxiosError(pciIdsFile)) return null