<?php

namespace Modules\Routing\Observers;

use Illuminate\Support\Facades\Cache;
use Modules\Routing\Models\PopularRoute;

class PopularRouteObserver
{
    public function saved(PopularRoute $popularRoute): void
    {
        Cache::tags('routes')->flush();
    }

    public function deleted(PopularRoute $popularRoute): void
    {
        Cache::tags('routes')->flush();
    }
}
