Application caches store resources for offline use. Each
application cache has a unique client ID for use with
nsICacheService::openSession() to access the cache’s entries.
Each entry in the application cache can be marked with a set of
types, as discussed in the WHAT-WG offline applications
specification.
All application caches with the same group ID belong to a cache
group. Each group has one “active” cache that will service future
loads. Inactive caches will be removed from the cache when they are
no longer referenced.
Init this application cache instance to just hold the group ID and
the client ID to work just as a handle to the real cache. Used on
content process to simplify the application cache code.
Makes this cache the active application cache for this group.
Future loads associated with this group will come from this
cache. Other caches from this cache group will be deactivated.
Discard this application cache. Removes all cached resources
for this cache. If this is the active application cache for the
group, the group will be removed.
Adds item types to a given entry.
Removes types from a given entry. If the resulting entry has
no types left, the entry is removed.
Gets the types for a given entry.
Returns any entries in the application cache whose type matches
one or more of the bits in typeBits.
Add a set of namespace entries to the application cache.
namespaces | An nsIArray of nsIApplicationCacheNamespace entries. |
Get the most specific namespace matching a given key.
URI of the manfiest specifying this application cache.
/
The group ID for this cache group. It is an internally generated string
and cannot be used as manifest URL spec.
/
The client ID for this application cache. Clients can open a
session with nsICacheService::createSession() using this client
ID and a storage policy of STORE_OFFLINE to access this cache.
TRUE if the cache is the active cache for this group.
The disk usage of the application cache, in bytes.
If set, this offline cache is placed in a different directory
than the current application profile.
Entries in an application cache can be marked as one or more of
the following types.