feat: ship creator journey v2 and profile updates
This commit is contained in:
31
app/Console/Commands/WarmHomepageGuestCacheCommand.php
Normal file
31
app/Console/Commands/WarmHomepageGuestCacheCommand.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Services\HomepageService;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
final class WarmHomepageGuestCacheCommand extends Command
|
||||
{
|
||||
protected $signature = 'homepage:warm-guest-cache';
|
||||
|
||||
protected $description = 'Warm the guest homepage payload cache';
|
||||
|
||||
public function handle(HomepageService $homepage): int
|
||||
{
|
||||
$startedAt = microtime(true);
|
||||
$payload = $homepage->warmGuestPayloadCache();
|
||||
$durationMs = (microtime(true) - $startedAt) * 1000;
|
||||
|
||||
$this->info(sprintf(
|
||||
'Warmed guest homepage cache (%d sections) in %.2fms using store [%s].',
|
||||
count($payload),
|
||||
$durationMs,
|
||||
$homepage->guestPayloadCacheStoreName(),
|
||||
));
|
||||
|
||||
return self::SUCCESS;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user