Cache current day stats for 5m
This commit is contained in:
@@ -32,6 +32,7 @@ func (job *RecalculateCurrentDayStatsJob) recalculateCurrentDayStats() {
|
||||
today := time.Now().Truncate(24 * time.Hour)
|
||||
yesterday := today.Add(-24 * time.Hour)
|
||||
|
||||
database.DeleteDailyStatsForDay(job.DB, today)
|
||||
database.GetDailyStats(job.DB, today)
|
||||
|
||||
// Need to keep yesterday's stats cache updated
|
||||
|
||||
Reference in New Issue
Block a user