Cache class

Provides a storage mechanism for Request / Response object pairs that are cached, for example as part of the ServiceWorker life cycle. Note that the Cache interface is exposed to windowed scopes as well as workers. You don't have to use it in conjunction with service workers, even though it is defined in the service worker spec. Available only in secure contexts.

MDN Reference

Available extensions
Annotations
  • @JS()
  • @staticInterop

Constructors

Cache()
factory

Properties

add Future<void> Function(Object)

Available on Cache, provided by the Cache$Typings extension

getter/setter pair
addAll → ({Future<void> Function(List<Object> requests) $1, Future<void> Function(Iterable<Object> requests) $2})

Available on Cache, provided by the Cache$Typings extension

Overload accessor: $1, $2
no setter
delete Future<bool> Function(Object, [CacheQueryOptions?])

Available on Cache, provided by the Cache$Typings extension

getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
keys Future<ReadonlyArray<Request>> Function([Object?, CacheQueryOptions?])

Available on Cache, provided by the Cache$Typings extension

getter/setter pair
match Future<Response?> Function(Object, [CacheQueryOptions?])

Available on Cache, provided by the Cache$Typings extension

getter/setter pair
matchAll Future<ReadonlyArray<Response>> Function([Object?, CacheQueryOptions?])

Available on Cache, provided by the Cache$Typings extension

getter/setter pair
put Future<void> Function(Object, Response)

Available on Cache, provided by the Cache$Typings extension

getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited