1// Copyright 2014 The Chromium Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5// https://w3c.github.io/ServiceWorker/#cachestorage-interface 6[ 7 ActiveScriptWrappable, 8 SecureContext, 9 Exposed=(Window,Worker) 10] interface CacheStorage { 11 [CallWith=ScriptState, MeasureAs=CacheStorageRead, RaisesException] 12 Promise<any> match(RequestInfo request, 13 optional MultiCacheQueryOptions options = {}); 14 15 [CallWith=ScriptState, MeasureAs=CacheStorageRead] 16 Promise<boolean> has(DOMString cacheName); 17 18 [CallWith=ScriptState] Promise<Cache> open(DOMString cacheName); 19 20 [CallWith=ScriptState, MeasureAs=CacheStorageWrite, ImplementedAs=Delete] 21 Promise<boolean> delete(DOMString cacheName); 22 23 [CallWith=ScriptState, MeasureAs=CacheStorageRead] 24 Promise<sequence<DOMString>> keys(); 25}; 26