Closed jeffposnick closed 7 years ago
Now that CacheQueryOptions is widely supported, we should let developers pass it in to configure how the underlying cache.match() behaves inside a handler.
CacheQueryOptions
cache.match()
We're already doing something similar in sw-helpers.
sw-helpers
The interface would look something like:
toolbox.router.get(new RegExp('/path/to/file'), toolbox.networkFirst, { cache: { name: 'my-cache', queryOptions: { ignoreSearch: true, // Any other supported options... } } });
And then options.cache.queryOptions would get passed in as the second parameter to cache.match().
options.cache.queryOptions
CC: @mohsen1
(I realize that I neglected to add any tests—those are incoming.)
Now that
CacheQueryOptions
is widely supported, we should let developers pass it in to configure how the underlyingcache.match()
behaves inside a handler.We're already doing something similar in
sw-helpers
.The interface would look something like:
And then
options.cache.queryOptions
would get passed in as the second parameter tocache.match()
.CC: @mohsen1