match

inline suspend fun Cache.match(url: String): Response?(source)
inline suspend fun Cache.match(url: String, options: CacheQueryOptions): Response?(source)

The match() method of the Cache interface returns a Promise that resolves to the Response associated with the first matching request in the Cache object. If no match is found, the Promise resolves to undefined.

MDN Reference


inline suspend fun Cache.match(url: URL): Response?(source)
inline suspend fun Cache.match(url: URL, options: CacheQueryOptions): Response?(source)
inline suspend fun Cache.match(request: Request): Response?(source)
inline suspend fun Cache.match(request: Request, options: CacheQueryOptions): Response?(source)
inline suspend fun CacheStorage.match(url: URL): Response?(source)
inline suspend fun CacheStorage.match(url: URL, options: MultiCacheQueryOptions): Response?(source)
inline suspend fun CacheStorage.match(request: Request): Response?(source)
inline suspend fun CacheStorage.match(request: Request, options: MultiCacheQueryOptions): Response?(source)


inline suspend fun CacheStorage.match(url: String): Response?(source)
inline suspend fun CacheStorage.match(url: String, options: MultiCacheQueryOptions): Response?(source)

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.

MDN Reference