Search Results for

    Show / Hide Table of Contents
    View Source

    Class CacheHelperExtensions

    Extension methods for the cache helper

    Inheritance
    System.Object
    Namespace: Umbraco.Extensions
    Assembly: Umbraco.Web.Common.dll
    Syntax
    public static class CacheHelperExtensions

    Methods

    View Source

    CachedPartialView(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
    Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper
    System.String partialViewName
    System.Object model
    TimeSpan cacheTimeout
    System.String cacheKey

    used to cache the partial view, this key could change if it is cached by page or by member

    Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary viewData
    Returns
    Type Description
    Microsoft.AspNetCore.Html.IHtmlContent
    • Improve this Doc
    • View Source
    In This Article
    • Methods
      • CachedPartialView(AppCaches, IHostingEnvironment, IUmbracoContext, IHtmlHelper, String, Object, TimeSpan, String, ViewDataDictionary)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX