/// <summary> /// 尝试获取缓存的输出 /// </summary> /// <returns>缓存的输出</returns> protected virtual ICachedResponse ResolveCache(string virtualPath) { var policy = HtmlServices.GetCachePolicy(HttpContext); if (policy == null) { return(null); } CachePolicy = policy; var clientCachePolicy = policy as IClientCacheablePolicy; if (clientCachePolicy != null) { var response = clientCachePolicy.ResolveClientCache(); if (response != null) { return(response); } } return(CachePolicy.ResolveCache()); }
public CachePolicy CreateCachePolicy(HttpContextBase context) { return(HtmlServices.GetCachePolicy(context)); }