Use VaryByCustom
to force a 'Cache Miss' when the request is from a Search Engine Crawler.
In your Controller/Action
:
[OutputCache(VaryByCustom="Crawler")]
public ActionResult Index()
{
// ...
return View();
}
Then in your Global.asax
:
public override string GetVaryByCustomString(HttpContext context, string arg)
{
if (arg == "Crawler" && context.Request.Browser.Crawler)
return Guid.NewGuid().ToString();
return base.GetVaryByCustomString(context, arg);
}