Enhance dashboard service with Redis caching for statistics
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
- Updated the dashboard service to integrate Redis caching for improved performance in statistics retrieval. - Modified the NewService function to accept a Redis client, enabling caching of dashboard statistics. - Implemented logic to retrieve statistics from Redis, falling back to the database if necessary, and introduced a background process to warm the cache. - Enhanced error handling and logging for Redis operations to ensure robust statistics management. - Increased cache duration for scraped documents and adjusted timeout settings for MongoDB queries to optimize performance. This update significantly improves the responsiveness and efficiency of the dashboard by leveraging Redis for caching statistics.
This commit is contained in:
+1
-1
@@ -253,7 +253,7 @@ func main() {
|
||||
kanbanService := kanban.NewService(boardRepository, columnRepository, cardRepository, goRulesClient, conf.GoRules.RuleID, logger)
|
||||
documentScraperService := document_scraper.NewService(tenderRepository, aiPipelineClient, logger)
|
||||
dashboardRepository := dashboard.NewRepository(mongoManager, logger, procedureDocumentsLister)
|
||||
dashboardService := dashboard.NewService(dashboardRepository, logger)
|
||||
dashboardService := dashboard.NewService(dashboardRepository, logger, redisClient)
|
||||
aiPipelineService := ai_pipeline.NewService(aiPipelineClient, logger, tenderService)
|
||||
auditLogRepository := auditlog.NewRepository(auditStore)
|
||||
auditLogService := auditlog.NewService(auditLogRepository, logger)
|
||||
|
||||
Reference in New Issue
Block a user