Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
 public static MvcHtmlString GetCached(this HtmlHelper helper, CachingInfo cachingInfo,
     Func<HtmlHelper, MvcHtmlString> func)
 {
     return MrCMSApplication.Get<IHtmlCacheService>().GetString(helper, cachingInfo, func);
 }
Exemplo n.º 3
0
 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);
 }