protected function buildRouteCollection()
    {
        if (Cache::enabled() && $this->cacheConfig !== null) {
            return Cache::remember(static::ROUTE_COLLECTION_CACHE_KEY, function () {
                return $this->prepareRouteCollection();
            }, $this->cacheConfig);
        }

        return $this->prepareRouteCollection();
    }