There are three different caches involved in WebKit on Mac OS X.

A) The resource cache in the NSURL networking layer, which caches both in memory and on disk.
    B) The resource cache inside WebCore, which caches in memory.
C) The page cache in WebCore, a higher level cache which only affects "go back" and "go forward" commands.

1. Overriding the NSURLCache cachedResponseForRequest and cachedResponse forRequest methods

To turn off cache (A) you can call:

    [[NSURLCache sharedURLCache] setMemoryCapacity:0];
    [[NSURLCache sharedURLCache] setDiskCapacity:0];

   WebPreferences *prefs = [webView preferences];
   [prefs setUsesPageCache:NO];

The code above turns off cache (C).

One way to turn off cache (B) is to do this:

    [prefs setCacheModel:WebCacheModelDocumentViewer]

I suggest giving that a try.

    -- Darin

_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to