Serve dashboard stats from daily_stats and default visit list to today.

Stop live-scanning page_visits on every dashboard load (including today) so the admin home stays fast; keep the live path only for channel filters and cache the result for 45s.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
root
2026-10-11 09:46:38 +00:00
parent 11caef98fc
commit fcbc479c2e
9 changed files with 550 additions and 76 deletions
+5 -1
View File
@@ -13,7 +13,9 @@ class DailyStat extends Model
protected $fillable = [
'stat_date',
'scope_key',
'pv',
'uv',
'effective_pv',
'effective_uv',
'devices',
'wallet_devices',
@@ -25,7 +27,9 @@ class DailyStat extends Model
protected function casts(): array
{
return [
'pv' => 'integer',
'uv' => 'integer',
'effective_pv' => 'integer',
'effective_uv' => 'integer',
'devices' => 'integer',
'wallet_devices' => 'integer',
@@ -34,4 +38,4 @@ class DailyStat extends Model
'computed_at' => 'datetime',
];
}
};
}