Ejemplo n.º 1
0
        public override async Task <string> GetPlaceHolderHtmlAsync()
        {
            var requestUri = $"{_fragmentInfo.Source}/{_fragmentInfo.Name}/placeholder";

            if (_memoryCache.TryGetValue(requestUri, out string cachedHtml))
            {
                return(cachedHtml);
            }

            var placeHolderHtml = await _httpClientProvider.GetAsStringAsync(requestUri);

            _memoryCache.Set(requestUri, placeHolderHtml);
            return(placeHolderHtml);
        }