Enhance dashboard summary and statistics with new fields and caching improvements
continuous-integration/drone/push Build is passing
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user