title: ASP.NET MVC: Problem with OutputCache
body: <p>for my current project it's necessary to generate dynamic CSS...</p>
  
  <p>So, i have a partial view which serves as a CSS deliverer... The controller code looks like this:</p>
  
  <pre><code>    [OutputCache(CacheProfile = "DetailsCSS")]
      public ActionResult DetailsCSS(string version, string id)
      {
          // Do something with the version and id here.... bla bla
          Response.ContentType = "text/css";
          return PartialView("_css");
      }
  </code></pre>
  
  <p>The output cache profile looks like:</p>
  
  <pre><code>&lt;add name="DetailsCSS" duration="360" varyByParam="*" location="Server" varyByContentEncoding="none" varyByHeader="none" /&gt;
  </code></pre>
  
  <p>The problem is: When i use the OutputCache line ([OutputCache(CacheProfile = "DetailsCSS")]), the response is of content type "text/html", instead of "text/css"... when i remove it, it works as expected...</p>
  
  <p>So, for me it seems that the OutputCache doesn't save my "ContentType" setting here... is there any way around this?</p>
  
  <p>Thanks</p>