// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// See https://w3c.github.io/ServiceWorker/#cachestorage-interface
[
    Exposed=(Window,Worker)
] interface CacheStorage {
  [CallWith=ScriptState, RaisesException] Promise<any> match(RequestInfo request, optional CacheQueryOptions options);
  [CallWith=ScriptState, RaisesException] Promise<boolean> has(DOMString cacheName);
  [CallWith=ScriptState, RaisesException] Promise<Cache> open(DOMString cacheName);
  [CallWith=ScriptState, RaisesException, ImplementedAs=deleteFunction] Promise<boolean> delete(DOMString cacheName);
  [CallWith=ScriptState, RaisesException] Promise<sequence<DOMString>> keys();
};
