Hi...
I know concept of caching but i want to know VaryByParam .....
<%@ OutputCache Duration="no of seconds" Location="Any | Client | Server | None" VaryByParam="parameter" %>
I want to know meaning of these...
VaryByParam="Parameter"
VaryByParam=" * "
VaryByParam="None"
what is the meaning of "Parameter" and " * " and "None" in the caching concept .
Please explain....?
Thanks....
Loading

Vineet Kumar SainiPosted Dec 12, 2011, 1:58 PM
I asked only difference among the
VaryByParam="Parameter"
VaryByParam=" * "
VaryByParam="None"
What is the meaning of parameter, * and none ? Please give sort and suitable answer .......
Satyapriya NayakPosted Dec 10, 2011, 6:15 AM
none One version of page cached (only raw GET)
* N versions of page cached based on query string GET/ POST body
The
VaryByParamis a useful setting that can be used to cache different "views" of a dynamic page whose content is generated by GET or POST values. For example, you may have an ASP.NET Web page that reads in a Part number from the QueryString and displays information about a particular widget whose part number matches the QueryString Part number. Imagine for a moment that Output Caching ignored the QueryString parameters altogether (which you can do by settingVaryByParam="none"). If the first user visited the page with QueryString/ProductInfo.aspx?PartNo=4, she would see information out widget #4. The HTML for this page would be cached. The next user now visits and wished to see information on widget #8, a la/ProductInfo.aspx?PartNo=8. IfVaryByParamis set toVaryByParam="none", the Output Caching engine will assume that the requests to the two pages are synonymous, and return the cached HTML for widget #4 to the person wishing to see widget #8! To solve for this problem, you can specify that the Output Caching engine should vary its caches based on thePartNoparameter by either specifying it explicitly, likeVaryByParam="PartNo", or by saying to vary on all GET/POST parameters, like:VaryByParam="*".Refer
http://www.4guysfromrolla.com/articles/022802-1.aspx
Thanks