The match()
method of the CacheStorage
interface checks if a given Request
or URL string is a key for a stored Response
. This method returns a Promise
for a Response
, or a Promise
which resolves to undefined
if no match is found.
You can access CacheStorage
through the global caches
property.
Cache
objects are searched in creation order.
Note: caches.match()
is a convenience method. Equivalent functionality is to call cache.match()
on each cache (in the order returned by caches.keys()
) until a Response
is returned.