To access cached items, a new cache session must be created using the createSession method provided in nsICacheService . This method creates an nsICacheSession
object. Information about the cache item can be obtained using the openCacheEntry method of the session object (return method nsICacheEntryDescriptor ). To read data, the user must open the input stream using the openInputStream method of the cache write object.
source
share