Summary
The dashboard API caches responses for 5 minutes using a flat key. This means users always see stale data and there's no way to bust the cache when new webhook events arrive for a specific project.
Implementation
In app/Http/Controllers/DashboardController.php, switch to tagged cache:
Cache::tags(['project-' . implode('-', $sortedProjectIds)])->remember($key, 300, fn() => ...);
After writing events in the webhook Job (see Phase 2 queuing issue), flush the relevant tag:
Cache::tags(['project-' . $project->id])->flush();
Note: Requires a cache driver that supports tags (Redis or Memcached). Add a conditional fallback for file/database drivers that skips tagging.
Acceptance Criteria
Summary
The dashboard API caches responses for 5 minutes using a flat key. This means users always see stale data and there's no way to bust the cache when new webhook events arrive for a specific project.
Implementation
In
app/Http/Controllers/DashboardController.php, switch to tagged cache:After writing events in the webhook Job (see Phase 2 queuing issue), flush the relevant tag:
Note: Requires a cache driver that supports tags (Redis or Memcached). Add a conditional fallback for file/database drivers that skips tagging.
Acceptance Criteria