如何缓存ASP.NET用户控件? [英] How to cache ASP.NET user controls?

查看:65
本文介绍了如何缓存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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆