I have an Action that has diferent results depending on some route value.
ie www.mysite.com/Home/About/Value1
is different then www.mysite.com/Home/About/Value2
.
Is there any chance I can use OutputCache
on the action About in controller Home with diferent output for www.mysite.com/Home/About/Value1
and www.mysite.com/Home/About/Value2
? I know I can use caching on model level, but I want to use OutputCache
on the action.
EDIT
www.mysite.com/Home/About/Value1
and then www.mysite.com/Home/About/Value2
actually have different cache entries as stated by Levi
Simply add the
[OutputCache()]
attribute to your About action method. If you want to vary it, you can use one of the parameters in theOutputCache attribute
.