ServiceWorkerGlobalScope.caches

caches 是一个 ServiceWorkerGlobalScope 接口的只读属性,返回与当前service worker相关联的CacheStorage对象。

语法

var myCacheStorage = self.caches;

返回值

一个 CacheStorage 对象。

规范

规范 状态 备注
Service Workers
ServiceWorkerGlobalScope.caches
Working Draft Initial definition.

浏览器兼容性

No compatibility data found for api.ServiceWorkerGlobalScope.caches.
Check for problems with this page or contribute missing data to mdn/browser-compat-data.

参见