How do u cache a web page in ASP.NET?

<%@ outputcache duration=”60” varybyparam=”none”>

What is difference between following statements:

  1. <%@ outputcache duration=”60” varybyparam=”none”>
  2. <%@ outputcache duration=”60” varybyparam=”*”>
  3. <%@ outputcache duration=”60” varybyparam=”name”>

Statement 1 caches only one version of the page irrespective of query-string parameters.
Statement 2 caches multiple versions of same page I any of query-string parameter varies.
Statement 3 caches multiple versions of the page for different values of parameter xyz.

Tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>