<?php

namespace Modules\Admin\App\Listeners;

use Illuminate\Auth\Events\Logout;
use Illuminate\Support\Facades\Log;
use Modules\Admin\App\Services\VuexyAdminService;

class ClearUserCache
{
    /**
     * Handle the event.
     *
     * @return void
     */
    public function handle(Logout $event)
    {
        if ($event->user) {
            VuexyAdminService::clearUserMenuCache();
            VuexyAdminService::clearSearchMenuCache();
            VuexyAdminService::clearQuickLinksCache();
            VuexyAdminService::clearNotificationsCache();
        }
    }
}
