nsIApplicationCacheService 编辑

netwerk/base/public/nsIApplicationCacheService.idlScriptable This interface manages the set of application cache groups that manage offline resources for web applications. 1.0 66 Introduced Gecko 1.9.1 Inherits from: nsISupports Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0)

Method overview

void cacheOpportunistically(in nsIApplicationCache cache, in ACString key);
nsIApplicationCache chooseApplicationCache(in ACString key);
nsIApplicationCache createApplicationCache(in ACString group);
void deactivateGroup(in ACString group);
nsIApplicationCache getActiveCache(in ACString group);
nsIApplicationCache getApplicationCache(in ACString clientID);
void getGroups([optional] out unsigned long count, [array, size_is(count), retval] out string groupIDs);

Methods

cacheOpportunistically()

Flags the specified key as one that should be cached opportunistically.

Note: This method should propagate the entry to other application caches with the same opportunistic namespace; however, this is not currently implemented.
void cacheOpportunistically(
  in nsIApplicationCache cache,
  in ACString key
);
Parameters
cache
The cache in which the entry is currently cached.
key
The cache entry's key.

chooseApplicationCache()

Tries to find the best application cache to serve a specified resource.

nsIApplicationCache chooseApplicationCache(
  in ACString key
);
Parameters
key
The cache entry key for which to select an application cache.
Return value

The nsIApplicationCache best able to serve the resource indicated by the key parameter.

createApplicationCache()

Creates a new, empty application cache for the specified cache group.

nsIApplicationCache createApplicationCache(
  in ACString group
);
Parameters
group
The cache group for which to create an application cache.
Return value

The newly-created nsIApplicationCache.

deactivateGroup()

Deactivates the currently active cache object for the specified cache group.

void deactivateGroup(
  in ACString group
);
Parameters
group
The cache group to deactivate.

getActiveCache()

Returns the currently active cache object for a cache group.

nsIApplicationCache getActiveCache(
  in ACString group
);
Parameters
group
The cache group for which to return an application cache.
Return value

The currently active cache object for the cache group.

getApplicationCache()

Returns the nsIApplicationCache object for the specified client ID.

nsIApplicationCache getApplicationCache(
  in ACString clientID
);
Parameters
clientID
The client ID for which to return the application cache object.
Return value

The application cache object for the specified client ID.

getGroups()

Returns the list of application cache groups.

void getGroups(
  out unsigned long count, Optional
  [array, size_is(count), retval] out string groupIDs
);
Parameters
count Optional
The count of the application cache groups.
groupIDs
The list of application cache groups.

See also

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:76 次

字数:7231

最后编辑:6 年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文