Ejemplo n.º 1
0
    public string?GetRouteById(bool preview, int contentId, string?culture = null)
    {
        IAppCache?cache = preview == false || PublishedSnapshotService.FullCacheWhenPreviewing
            ? _elementsCache
            : _snapshotCache;
        var key = CacheKeys.ContentCacheRouteByContent(contentId, preview, culture);

        return(cache?.GetCacheItem(key, () => GetRouteByIdInternal(preview, contentId, null, culture)));
    }