<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:darin&#64;apple.com" title="Darin Adler &lt;darin&#64;apple.com&gt;"> <span class="fn">Darin Adler</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Disable Caches in Safari's Develop menu does not disable caches."
   href="https://bugs.webkit.org/show_bug.cgi?id=64483">bug 64483</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
               &nbsp;
           </td>
           <td>darin&#64;apple.com
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Disable Caches in Safari's Develop menu does not disable caches."
   href="https://bugs.webkit.org/show_bug.cgi?id=64483#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Disable Caches in Safari's Develop menu does not disable caches."
   href="https://bugs.webkit.org/show_bug.cgi?id=64483">bug 64483</a>
              from <span class="vcard"><a class="email" href="mailto:darin&#64;apple.com" title="Darin Adler &lt;darin&#64;apple.com&gt;"> <span class="fn">Darin Adler</span></a>
</span></b>
        <pre>OK, here are the two bugs I found:

1) Setting the cache model to CacheModelDocumentViewer does not turn off MemoryCache. It turns off caching of dead resources, but it sets a non-zero value for the total size of the memory cache, which means that live resources are indeed cached. This policy is implemented in the calculateCacheSizes function and the +[WebView _setCacheModel:]  method. I tried setting cacheTotalCapacity to 0 and indeed this fixed the original reported symptom. It might be bad, however, for clients using CacheModelDocumentViewer for something other than Safari’s Disable Caches. Performance might be suprisingly bad when the memory cache is entirely turned off. Presumably this regression dates back to when we Antti created the MemoryCache.

2) Setting the cache model to CacheModelDocumentViewer does not turn off the NSURLCache disk cache when NETWORK_CACHE is disabled. This policy is in the NetworkProcess::platformSetCacheModel function and the +[WebView _setCacheModel:]  method. Neither will ever shrink disk capacity, only make it larger. Comment says, “Don't shrink a big disk cache, since that would cause churn.” I don’t understand the thinking behind this. This has always been the case &lt;<a href="http://trac.webkit.org/changeset/25430">http://trac.webkit.org/changeset/25430</a>&gt;. Safari attempts to work around this by calling -[NSURLCache setDiskCapacity:] directly but this has not had any effect on WebKit networking since we moved it from the UI process to the web process and then later to the network process.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>