This feature is experimental. It may be changed or removed in a future version.
Returns a cached request matching the given request options.
Returns undefined
if the given request is not currently cached.
Important
up.request()
andup.render()
will only write to the cache when a{ cache }
option is set.
let request = up.cache.get({ url: '/foo' })
if (request) {
let response = await request
console.log("Response is %o", response)
} else {
console.log("The path /foo has not been requested before!")
}
The request options to match against the cache.
See options
for up.request()
for documentation.
The cached request.