[webkit-help] clearing the cache
aaron reed
joevolleyball at hotmail.com
Mon Sep 12 17:37:06 PDT 2011
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-help/attachments/20110912/af3599f8/attachment.html>
More information about the webkit-help
mailing list