private function clearCache(): void
    {
        try {
            $cacheTag = config('netcore.module-category.cache_tag');
            $isRedis = cache()->getStore() instanceof RedisStore;

            if ($cacheTag && $isRedis) {
                cache()->tags([$cacheTag])->flush();
            } else {
                cache()->flush();
            }
        } catch (Exception $exception) {
            logger()->error('[module-category] Unable to clear cache: ' . $exception->getMessage());
        }
    }