Enhance dashboard summary and statistics with new fields and caching improvements
continuous-integration/drone/push Build is passing

- Added new field `Days` and `ScrapedTED` to `SummaryResponse` for tracking daily TED scrape counts.
- Updated `SummaryQuery` to include `Days` parameter for querying scraped TED data.
- Modified `Summary` handler to accept and process the new `Days` parameter.
- Refactored `Summary` method in the repository to support the new `Days` parameter and improved aggregation logic.
- Enhanced caching logic in the service layer to utilize a composite cache key based on `closingWindowSec` and `days`, improving cache management and retrieval efficiency.

This update improves the dashboard's functionality by providing more detailed insights into TED scraping activities and optimizing the caching strategy for better performance.
This commit is contained in:
Mazyar
2026-07-01 23:03:23 +03:30
parent eeafe2a625
commit 541d08a014
6 changed files with 347 additions and 119 deletions
+1
View File
@@ -3,6 +3,7 @@ package dashboard
// SummaryQuery binds query params for GET /dashboard/summary.
type SummaryQuery struct {
ClosingWindow int `query:"closing_window"`
Days int `query:"days"`
}
// TrendQuery binds query params for GET /dashboard/trend.