题
如果我使用在asp.net页面替换控制,并且还添加以下指令到页:
<%@ OutputCache Duration="7200" VaryByParam="None" Location="Any" %>
会位置属性被忽略,因为使用一个页上的取代控制使得页面缓存只在服务器上
解决方案
是,它会被忽略。 Substition.Render呼叫,通过RenderMarkup,HttpResponse.WriteSubstitution调用HttpCachePolicy.SetCacheability(HttpCacheability.Server)。
不隶属于 StackOverflow