feat: Phase 1 - Redis config, Dashboard cache, Report cache, N+1 fixes, observers
- Add predis/predis for Redis support - Configure cache/queue defaults to redis in config + .env.example - Create DashboardController with 60s cache for dashboard queries - Add cache (5min) to ReportController::generate() and preview() - Add FeatureObserver, InspectionObserver, IssueObserver for cache invalidation - Fix N+1 in ProjectMap (eager load template, images), TaskManager (subtasks.parentTask) - Register observers in AppServiceProvider Tests: 101 passing (319 assertions)
This commit is contained in:
@@ -109,7 +109,7 @@ class ProjectMap extends Component
|
||||
$this->authorizeProjectAccess();
|
||||
|
||||
$this->phases = $project->phases()->with([
|
||||
'layers' => fn ($q) => $q->withCount('features'),
|
||||
'layers' => fn ($q) => $q->withCount('features')->with(['features.template', 'features.images']),
|
||||
'layers.features',
|
||||
'layers.features.images',
|
||||
])->get();
|
||||
@@ -124,7 +124,7 @@ class ProjectMap extends Component
|
||||
|
||||
$this->allFeatures = Feature::whereHas('layer.phase', function ($q) use ($project) {
|
||||
$q->where('project_id', $project->id);
|
||||
})->with(['layer.phase', 'template'])->get();
|
||||
})->with(['layer.phase', 'template', 'images'])->get();
|
||||
|
||||
$this->allInspections = Inspection::where('project_id', $project->id)
|
||||
->with(['feature.layer.phase', 'template', 'user'])
|
||||
|
||||
Reference in New Issue
Block a user