The Cache interface is a collection of methods and properties to manage stored responses. You cannot create a cache object; you must open a reference to a cache using the Caches.open method, which will be covered later. This reference is an instance of the Cache object, giving you access to the responses it manages.
The Cache object
cache.match()
The match method has two parameters, a request object and an optional options object. It returns a promise if a matching response is found to be resolved in the promise's return. If no response was found, the promise still resolves, but as undefined.
If no match was found, you can then continue with the appropriate logic, like forwarding the request to the network or returning...