如何缓存ASP.NET用户控件? [英] How to cache ASP.NET user controls?
本文介绍了如何缓存ASP.NET用户控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在最近的Podcast(多态)上听说,可以缓存用户控件而不是整个页面。
I heard on a recent podcast (Polymorphic) that it is possible to cache a user control as opposed to the entire page.
我认为显示静态内容的页眉控件和页脚控件可以从缓存中受益。
I think my header control which displays static content and my footer control could benefit from being cached.
我该如何缓存这些控件?
How can I go about caching just those controls?
推荐答案
在此处查看
您可以在输出缓存中使用 VaryByParam
和 VaryByControl
。
这篇关于如何缓存ASP.NET用户控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文