Simulasi Jabatan agar halaman terbuka ringan'; public function handle(): int { $periode = $this->argument('periode') ? Periode::where('id_periode', $this->argument('periode'))->first() : Periode::where('status', true)->first(); if (! $periode) { $this->error('Periode tidak ditemukan.'); return self::FAILURE; } $id = (int) $periode->id_periode; Cache::forget(SimulasiJabatanController::datasetCacheKey($id, false)); Cache::forget(SimulasiJabatanController::datasetCacheKey($id, true)); $start = microtime(true); $controller = app(SimulasiJabatanController::class); $rows = $controller->dataset($id, false); $rowsSplit = $controller->dataset($id, true); $this->info(sprintf( 'Periode %d: %d baris (gabung) + %d baris (pecah per unit bayar) di-cache (%.1fs).', $id, $rows->count(), $rowsSplit->count(), microtime(true) - $start )); return self::SUCCESS; } }