Mega Code Archive
Varying the Output Cache by a Custom Function
You create the custom function in the Global.asax file by overriding the GetVaryByCustomString() method.
File: Global.asax
<%@ Application Language="C#" %>
File: Default.aspx
<%@ Page Language="C#" %>
<%@ OutputCache Duration="3600" VaryByParam="none" VaryByCustom="css" %>
Vary By Custom