2Feb/100
How can you cache different version of same page using ASP. NET cache object?
Output cache functionality is achieved by using "OutputCache" attribute on ASP. NET page header. Below is the syntax
1: <%@ Output Cache Duration="20" Location="Server" Vary By Param="state" Vary By Custom="minor version" Vary By Header="Accept-Language"%>
-
Vary By Param: - Caches different version depending on input parameters send through HTTP POST/GET.
-
Vary By Header: - Caches different version depending on the contents of the page header.
-
Vary By Custom: -Lets you customize the way the cache handles page variations by declaring the attribute and overriding the Get Vary By Custom String handler.
-
Vary By Control: -Caches different versions of a user control based on the value of properties of ASP objects in the control.