diff --git a/server.js b/server.js index 283b0b7..4cfd23a 100644 --- a/server.js +++ b/server.js @@ -471,7 +471,7 @@ function cacheMiddleware(ttlSeconds = 30) { timestamp: Date.now() }); - // Clean old cache entries periodically + // Clean old cache entries periodically using setImmediate to avoid blocking the response if (requestCache.size > 100) { // ⚡ Bolt Optimization: Run cleanup asynchronously to avoid blocking the main thread setImmediate(() => {