title: IIS won't cache large (76MB) file
body: <p>I can't seem to get IIS on Windows 2012 R2 to cache a large .exe file. That is, when I constantly request the file I see the file being read constantly in in Resource Monitor, and running</p>
  
  <pre><code>netsh http show cachestate
  </code></pre>
  
  <p>does not show the file cached.</p>
  
  <p>I think I've configured the system to cache .exe files for the folder in the kernel and to not have a max file size. The total cache size limit is 0, which I understand will make the system use up to half of all memory. The server has 6 GB of RAM, with lots of it free.</p>
  
  <p>That is, in the Output Cache settings for the root of the web server:</p>
  
  <ul>
  <li>Maximum cached response size (in bytes) = 0 (also reflected in applicationHost.config's maxResponseSize value)</li>
  <li>Cache size limit (in MB) is not checked (also in applicationHost.config maxCacheSize = 0)</li>
  <li>Enable cache and Enable kernel cache are checked (both set to true in applicationHost.config</li>
  </ul>
  
  <p>I'm serving the file from a virtual folder configured to be a 4.0 ASP.NET application. 4.6.2 is installed. The virtual folder points to a UNC share that is on the same system. (I know I could point to the local file system; I'm simulating hosting files that are on another system.)</p>
  
  <p>The web.config file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
    &lt;configuration&gt;
    &lt;system.webServer&gt;
      &lt;handlers&gt;
        &lt;clear /&gt;
        &lt;add name="StaticFile" path="*" verb="*" modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule" resourceType="Either" requireAccess="Read" /&gt;
      &lt;/handlers&gt;
      &lt;caching&gt;
        &lt;profiles&gt;
          &lt;add extension=".txt" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" /&gt;
          &lt;add extension=".exe" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" /&gt;
        &lt;/profiles&gt;
      &lt;/caching&gt;
    &lt;/system.webServer&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>It will cache small .txt and .exe files (about 20 bytes each).</p>
  
  <p>What am I missing that's preventing IIS from caching the large file?</p>