Rename PrimeCache to PrimeCacheAsync (keeping older name as obsolete overload). Fixes #246.

This commit is contained in:
SteveSandersonMS
2016-08-16 13:57:37 -07:00
parent c53bd8f8f6
commit 56cb898bde
2 changed files with 10 additions and 4 deletions

View File

@@ -11,9 +11,15 @@ namespace Microsoft.AspNetCore.AngularServices
{
public static class PrimeCacheHelper
{
public static async Task<HtmlString> PrimeCache(this IHtmlHelper html, string url)
[Obsolete("Use PrimeCacheAsync instead")]
public static Task<IHtmlContent> PrimeCache(this IHtmlHelper html, string url)
{
// TODO: Consider deduplicating the PrimeCache calls (that is, if there are multiple requests to precache
return PrimeCacheAsync(html, url);
}
public static async Task<IHtmlContent> PrimeCacheAsync(this IHtmlHelper html, string url)
{
// TODO: Consider deduplicating the PrimeCacheAsync calls (that is, if there are multiple requests to precache
// the same URL, only return nonempty for one of them). This will make it easier to auto-prime-cache any
// HTTP requests made during server-side rendering, without risking unnecessary duplicate requests.