October 2010
Intermediate to advanced
1920 pages
73h 55m
English
The VaryByCustom attribute is named the VaryByCustom attribute for a reason. You can specify a custom function that determines when a different cached version of a page is generated.
You can use any criteria that you want with the custom function. You can create different cached versions of a page depending on the browser minor version, the browser DOM support, the time of day, or even the weather.
You create the custom function in the Global.asax file by overriding the GetVaryByCustomString() method. For example, the Global.asax file in Listing 29.7 illustrates how you can override the GetVaryByCustomString() method to create different cached versions of a page depending on a particular feature ...
Read now
Unlock full access