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:
@@ -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',
|
||||
];
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user