I’ve optimized CAPA dashboards for several organizations and this is a common issue. The solution requires configuring all three areas properly:
Dashboard Data Caching:
The 15-minute cache interval is too long for task assignment changes. Navigate to Admin > Dashboards > CAPA Workflow Dashboard and adjust these settings:
- For the ‘My CAPA Tasks’ widget, reduce auto-refresh to 2 minutes
- Enable ‘Smart Cache Invalidation’ - this clears the cache when relevant data changes rather than waiting for the refresh interval
- Configure the cache scope to ‘User-Specific’ so each user’s dashboard cache is independent
For the widget data source, you don’t need to switch entirely to real-time queries. Instead, use a hybrid approach:
- Keep using the cached view ‘vw_capa_task_assignments’
- But enable ‘Invalidate on Assignment Change’ in the view configuration
- Set cache TTL (time-to-live) to 5 minutes as a fallback
This provides near real-time updates when assignments change, while still using cache for performance when nothing has changed.
Workflow Event Handlers:
This is the critical missing piece. Configure event handlers to trigger dashboard updates when task assignments change:
Go to Admin > CAPA > Workflow Configuration > Event Handlers and verify these events are configured:
Event: ‘Task Reassigned’
- Action: ‘Invalidate User Dashboard Cache’
- Scope: ‘Previous Assignee + New Assignee’
- Execution: ‘Immediate’
Event: ‘Task Assignment Modified’
- Action: ‘Update Dashboard Widget Data’
- Target Widgets: ‘My CAPA Tasks’, ‘Team Workload’
- Execution: ‘Asynchronous (1 minute delay)’
The key is invalidating the cache for BOTH the previous assignee and new assignee so both users see updated dashboards immediately.
If these event handlers don’t exist, create them using the Event Handler Configuration wizard. Select ‘CAPA Task’ as the object type, ‘Assignment Change’ as the trigger, and ‘Dashboard Cache Invalidation’ as the action.
Widget Data Source:
Optimize how the widget queries for task assignments. Edit the ‘My CAPA Tasks’ widget and update the data source configuration:
Current query likely looks like:
SELECT * FROM vw_capa_task_assignments
WHERE assignee_id = {current_user_id}
Update to include cache control:
SELECT * FROM vw_capa_task_assignments
WHERE assignee_id = {current_user_id}
AND (last_modified > {cache_timestamp} OR cache_version != {widget_cache_version})
This ensures the widget always gets the latest data if assignments were modified after the cache was created.
Also configure the widget to subscribe to real-time events. In the widget settings, enable:
- ‘Subscribe to Assignment Events’: Yes
- ‘Auto-Refresh on Event’: Yes
- ‘Event Types’: Task Assigned, Task Reassigned, Task Completed
When any of these events occur for tasks visible to the user, the widget will automatically refresh without waiting for the scheduled interval.
Implementation Steps:
- Update dashboard cache settings to 2-minute refresh with smart invalidation
- Create or verify event handlers for task reassignment events
- Modify widget data source to include cache control logic
- Enable event subscription on CAPA task widgets
- Clear all existing dashboard caches: Admin > System Maintenance > Clear Dashboard Cache
- Test by reassigning a CAPA task and verifying both users see the update within 1-2 minutes
Monitoring:
After implementation, monitor the dashboard performance and cache hit rates in Admin > System Health > Dashboard Performance. You should see:
- Cache invalidations occurring when tasks are reassigned
- Cache hit rate around 85-90% (good performance with fresh data)
- Dashboard load time under 2 seconds
If cache hit rate drops below 70%, you may need to adjust the refresh interval slightly higher. If users still report delays, check that the event handlers are executing successfully in Admin > System Logs > Event Handler Execution.
With these changes, your CAPA workflow dashboard will show task assignments within 1-2 minutes of any reassignment, providing the real-time visibility your team needs while maintaining good system performance.