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)); $start = microtime(true); $rows = app(SimulasiJabatanController::class)->dataset($id); $this->info(sprintf( 'Periode %d: %d baris di-cache (%.1fs).', $id, $rows->count(), microtime(true) - $start )); return self::SUCCESS; } }