<?php

namespace App\Domain\Website\Services;

use Illuminate\Support\Facades\Cache;

class WebsiteCacheService
{
    public function invalidate(int $academyId): void
    {
        $keys = [
            "website.{$academyId}.page",
            "website.{$academyId}.activities",
            "website.{$academyId}.programs",
            "website.{$academyId}.branches",
            "website.{$academyId}.stats",
        ];

        foreach ($keys as $key) {
            Cache::forget($key);
        }
    }

    public function invalidateAll(): void
    {
        Cache::flush();
    }
}
