title: MVC 5: PartialViewResult action cache never changes with VaryByParam:="*"
body: <p>I'm having issues with OutputCache for a partial view action. My index action controller is defined like so...</p>
  
  <pre><code>&lt;OutputCache(Duration:=3600, VaryByParam:="*")&gt;      
  &lt;Route("")&gt;
  &lt;HttpGet&gt;
  Public Function Index(value As MySearchFilter) As ActionResult
      ViewData("Title") = "Search Jobs"
      Return View("Index", value)
  End Function
  </code></pre>
  
  <p>and I have a PartialViewResult action defined like so...</p>
  
  <pre><code>&lt;OutputCache(Duration:=3600, VaryByParam:="*")&gt;
  &lt;Route("search")&gt;
  &lt;HttpGet&gt;
  Public Function Search(value As MySearchFilter) As PartialViewResult
      Return PartialView("_List", Search(value))
  End Function
  </code></pre>
  
  <p>In my Index view (vbhtml), I call the partial action like so...</p>
  
  <pre><code>@Html.Action("Search")
  </code></pre>
  
  <p>This works fine without caching. I can see that the "Search" action is getting the correct filter object passed to it etc.</p>
  
  <p>The issue I'm having is that with caching enabled, VaryByParam:="*" seems to be ignored. The result never changes, even when the querystring params change. When I debug, I can see that the action is only called the first time, and never after that.</p>
  
  <p>The main "Index" action works correctly, and any change to the parameters correctly caches different content.</p>
  
  <p>I know I could just use caching on the index action, and turn it off for the "Search" action, but I have a number of other partial views, and I'd like to be able to control the caching independently for each.</p>
  
  <p>Note:
  I'm not trying to customise the cache by RouteData.Values, I'm trying to customise it by Querystring parameters, which is supposed to be exactly what VaryByParam does. In the debugger I can see that the Request.QueryString is available to controller action. I'm completely stumped, I can't understand why it's not working.</p>