public ActionResult GetContent(HtmlHelper helper, CachingInfo cachingInfo, Func<HtmlHelper, MvcHtmlString> func) { return _cacheManager.Get(cachingInfo.CacheKey, () => new ContentResult { Content = func(helper).ToString() }, cachingInfo.ShouldCache ? cachingInfo.TimeToCache : TimeSpan.Zero, cachingInfo.ExpiryType); }
public static MvcHtmlString GetCached(this HtmlHelper helper, CachingInfo cachingInfo, Func<HtmlHelper, MvcHtmlString> func) { return MrCMSApplication.Get<IHtmlCacheService>().GetString(helper, cachingInfo, func); }
public MvcHtmlString GetString(HtmlHelper helper, CachingInfo cachingInfo, Func<HtmlHelper, MvcHtmlString> func) { return _cacheManager.Get(cachingInfo.CacheKey, () => func(helper), cachingInfo.ShouldCache ? cachingInfo.TimeToCache : TimeSpan.Zero, cachingInfo.ExpiryType); }