什么是的VaryByParam在asp.net? [英] What is VaryByParam in asp.net?

查看:124
本文介绍了什么是的VaryByParam在asp.net?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

虽然我的缓存工作,没有类似

While I am working on cache, there is something like

的VaryByParam

VaryByParam

在页面指令。所以,这是什么?任何人都可以解释给我吗?

in page directive. So what is this? Can anybody explain it to me?

推荐答案

的OutputCache(MSDN)

用来改变输出缓存字符串的分号分隔的列表。默认情况下,这些字符串对应于具有GET方法的属性,或使用POST方法发送参数发送的查询字符串值。当该属性被设置为多个参数,输出缓存包含不同版本为每个指定的参数所请求文档的。可能的值包括无,*,任何有效的查询字符串或POST参数名称。

A semicolon-separated list of strings used to vary the output cache. By default, these strings correspond to a query string value sent with GET method attributes, or a parameter sent using the POST method. When this attribute is set to multiple parameters, the output cache contains a different version of the requested document for each specified parameter. Possible values include none, *, and any valid query string or POST parameter name.

通过使用它,如果使用相同的变量值调用你的页面,该页面会从缓存中检索并直到时间持续时间参数especified将不会被执行是到达。

By using it, if you call your page using same variable value, that page will be retrieved from your cache and will not be executed until time especified in Duration argument be reached.

这篇关于什么是的VaryByParam在asp.net?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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