Hi,

I'm embedding WebKit on my own Windows c# control and I'd like to clear the 
cache for WebKit.  I tried doing this:

HRESULT WKWrapper::emptyCache()
{
    IWebCache *webCache = NULL;
    HRESULT rv = WebKitCreateInstance(CLSID_WebCache, 0, IID_IWebCache, 
(void**)&webCache);
    if (FAILED(rv)) {
        return rv;
    }
    if (!webCache) {
        return E_FAIL;
    }
    rv = webCache->empty();
    webCache->Release();
    return rv;
}

This doesn't seem to clear the cache, though.  I still have to reload the page 
to see changes to the web page.  Navigating
forward or backward won't show the changes.  But emptying the cache in Safari 
and then navigating forward or backward
will show the changes.

Am I missing something?  Is there some way to get the WebCache object from 
WebKit by querying it?  Looking at the code
that didn't seem necessary (since everything WebCache::empty() calls is static).

Any help appreciated,
--Aaron
                                          
_______________________________________________
webkit-help mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-help

Reply via email to