feat: enhance file upload process with temporary file handling, improved error management, and metrics logging
This commit is contained in:
+9
-6
@@ -71,11 +71,14 @@ export const fileInfoCache = new Cache<{
|
||||
}>(3600);
|
||||
|
||||
// Cleanup expired cache entries every 5 minutes
|
||||
setInterval(() => {
|
||||
const removed = fileInfoCache.cleanup();
|
||||
if (removed > 0) {
|
||||
console.log(`Cleaned up ${removed} expired cache entries`);
|
||||
}
|
||||
}, 5 * 60 * 1000);
|
||||
setInterval(
|
||||
() => {
|
||||
const removed = fileInfoCache.cleanup();
|
||||
if (removed > 0) {
|
||||
console.log(`Cleaned up ${removed} expired cache entries`);
|
||||
}
|
||||
},
|
||||
5 * 60 * 1000,
|
||||
);
|
||||
|
||||
export { Cache };
|
||||
|
||||
Reference in New Issue
Block a user