VaryByParam only works with the query string when the HTTP method is GET and parameters (i.e. values in the form and query string) when the HTTP method is POST. If you do not use the query string for routing, I do not think that it will work.
Please see the @OutputCache documentation.
http://msdn.microsoft.com/en-us/library/hdxfb6cy.aspx
Maybe you can write your own caching with C # in the code behind the page instead of relying on @OutputCache.
source
share