Personally, I use the VaryByCustom attribute so that you can log in and out with different types of cached pages:
<%@ OutputCache VaryByCustom="IsLoggedIn" Duration="30" VaryByParam="*" %>
then in global.asax you put
public override string GetVaryByCustomString(HttpContext context,
string arg)
{
if (arg == "IsLoggedIn")
{
if (context.Request.IsAuthenticated)
{
return "Logged in: " + context.User.Identity.Name;
}
else
{
return "Not Logged In";
}
}
else
{
return base.GetVaryByCustomString(context, arg);
}
}
I'm just going to throw it away. What about substitution control?
http://msdn.microsoft.com/en-us/library/ms228212.aspx
- msdn:
Substitution , , .... , . - , , , .
, , , - .