Class CacheHelperExtensions
Extension methods for the cache helper
Inheritance
object
Namespace: Umbraco.Extensions
Assembly: Umbraco.Web.Common.dll
Syntax
public static class CacheHelperExtensions
Methods
View SourceCachedPartialView(AppCaches, IHostingEnvironment, IUmbracoContext, IHtmlHelper, string, object, TimeSpan, string, ViewDataDictionary?)
Outputs and caches a partial view in MVC
Declaration
public static IHtmlContent? CachedPartialView(this AppCaches appCaches, IHostingEnvironment hostingEnvironment, IUmbracoContext umbracoContext, IHtmlHelper htmlHelper, string partialViewName, object model, TimeSpan cacheTimeout, string cacheKey, ViewDataDictionary? viewData = null)
Parameters
| Type | Name | Description |
|---|---|---|
| AppCaches | appCaches | |
| IHostingEnvironment | hostingEnvironment | |
| IUmbracoContext | umbracoContext | |
| IHtmlHelper | htmlHelper | |
| string | partialViewName | |
| object | model | |
| TimeSpan | cacheTimeout | |
| string | cacheKey | used to cache the partial view, this key could change if it is cached by page or by member |
| ViewDataDictionary | viewData |
Returns
| Type | Description |
|---|---|
| IHtmlContent |