Cache class

Represents the storage for Request / Response object pairs that are cached as part of the ServiceWorker life cycle.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(dynamic request) Future<void>
Returns a Promise that resolves to a new Cache entry whose key is the request.
addAll(List requests) Future<void>
Returns a Promise that resolves to a new array of Cache entries whose keys are the requests.
delete(dynamic request, [CacheOptions? options]) Future<bool>
Finds the Cache entry whose key is the request, and if found, deletes the Cache entry and returns a Promise that resolves to true. If no Cache entry is found, it returns false.
keys([Request? request, CacheOptions? options]) Future<List<Request>>
Returns a Promise that resolves to an array of Cache keys.
match(dynamic request, [CacheOptions? options]) Future<Response?>
Returns a Promise that resolves to the response associated with the first matching request in the Cache object.
matchAll(dynamic request, [CacheOptions? options]) Future<List<Response>>
Returns a Promise that resolves to an array of all matching responses in the Cache object.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
put(dynamic request, Response response) Future<void>
Adds additional key/value pairs to the current Cache object.
toString() String
A string representation of this object.
inherited

Operators

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