title: IIS 7.5 adds no-cache to cache-control response
body: <p>I'm using Azure and IIS 7.5 to serve my web app, I'm not using .NET though.</p>
  
  <p>I'm trying to override the default cache-control value for my static files but it seems that IIS 7.5 adds <em>no-cache</em> no matter what I specify.</p>
  
  <p>My <em>approot/web.config</em> file looks like this:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;configuration&gt;
    &lt;system.webServer&gt;
      ...
  
      &lt;staticContent&gt;
        &lt;clientCache cacheControlCustom="public" cacheControlMode="UseMaxAge" cacheControlMaxAge="30.00:00:00" /&gt; 
      &lt;/staticContent&gt;
      ...
  
    &lt;/system.webServer&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>and my response headers are:</p>
  
  <pre><code>Accept-Ranges:bytes
  Access-Control-Allow-Origin:*
  Cache-Control:no-cache,public,max-age=2592000
  Content-Encoding:gzip
  Content-Length:4309
  Content-Type:application/x-javascript
  Date:Mon, 10 Sep 2012 14:42:07 GMT
  ETag:"8ccd2f95a8fcd1:0"
  Last-Modified:Mon, 10 Sep 2012 13:48:36 GMT
  Server:Microsoft-IIS/7.5
  Vary:Accept-Encoding
  X-Powered-By:ASP.NET
  </code></pre>
  
  <p>I do have an extra <em>web.config</em> file in one of the subfolders but that doesn't override any <em>clientCache</em> values.</p>
  
  <p>Does anyone know why IIS is prepending <em>no-cache</em>?</p>
  
  <p>Thanks!</p>