Class CacheHelperExtensions
Extension methods for the cache helper
Inheritance
System.Object
Namespace: Umbraco.Web
Assembly: Umbraco.Web.dll
Syntax
public static class CacheHelperExtensions
Fields
View SourcePartialViewCacheKey
Declaration
public const string PartialViewCacheKey = "Umbraco.Web.PartialViewCacheKey"
Field Value
Type | Description |
---|---|
System.String |
Methods
View SourceCachedPartialView(AppCaches, HtmlHelper, String, Object, Int32, String, ViewDataDictionary)
Outputs and caches a partial view in MVC
Declaration
public static IHtmlString CachedPartialView(this AppCaches appCaches, HtmlHelper htmlHelper, string partialViewName, object model, int cachedSeconds, string cacheKey, ViewDataDictionary viewData = null)
Parameters
Type | Name | Description |
---|---|---|
AppCaches | appCaches | |
HtmlHelper | htmlHelper | |
System.String | partialViewName | |
System.Object | model | |
System.Int32 | cachedSeconds | |
System.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 |
---|---|
System.Web.IHtmlString |
ClearPartialViewCache(AppCaches)
Clears the cache for partial views
Declaration
public static void ClearPartialViewCache(this AppCaches appCaches)
Parameters
Type | Name | Description |
---|---|---|
AppCaches | appCaches |