Skip to content

Commit 7ae5673

Browse files
committed
Enhance Cache Middleware for Improved Background Processing and Logging
- Introduced placeholder content for processing and error states to provide immediate feedback during background data generation. - Implemented a locking mechanism to prevent duplicate background tasks for cache revalidation, ensuring efficient resource usage. - Enhanced logging throughout the middleware to improve traceability, including detailed logs for cache hits, misses, and background fetches. - Refactored cache handling logic to streamline the process of serving cached responses and managing stale data. - Removed redundant cleanup calls during cache hits to optimize performance. These changes aim to improve the overall efficiency and reliability of the cache middleware, particularly for the largest_perp_positions endpoint.
1 parent 3e6b9e5 commit 7ae5673

File tree

1 file changed

+376
-214
lines changed

1 file changed

+376
-214
lines changed

0 commit comments

Comments
 (0)