Hi,

The following JS function emties the mem cache

function ClearMemCache()
 {
   var classID = Components.classes["@mozilla.org/network/cache-service;1"];
(get contract id)
   var cacheService =
classID.getService(Components.interfaces.nsICacheService);   (get service
from contract)

cacheService.evictEntries(Components.interfaces.nsICache.STORE_IN_MEMORY);
(execute)
 }

I've tried do the same in c but I don't get it to work,

ClearMemCache()
{
     nsCOMPtr<nsICacheService> service;
    service = do_GetService ("@mozilla.org/network/cache-service;1");

    service->evictEntries (1); /* 1 == STORE_IN_MEMORY */
}

Is there something I'm missing ?
The compiler complains that there is no method evictEntries for
nsICacheService.

Any hints !?

Rgds,
    Per




Reply via email to