bn.getPrefetchCacheSync
▸ getPrefetchCacheSync(options
): PrefetchCacheResult
get prefetch cache data synchronously.
If prefetch data is not ready, it will return undefined
.
example
let res
try {
res = bn.getPrefetchCacheSync?.({ url: 'https://nezha-mock.fe.qa1fdg.net/order' })
} catch(e) {}
console.log(res, res.result)
Parameters
Name | Type | Description |
---|---|---|
options | PrefetchCacheOptions | prefetch cache options |
Returns
PrefetchCacheResult
prefetch cache result
Interface: PrefetchCacheOptions
Name | Type | Description |
---|---|---|
url | string | request url |
Interface: PrefetchCacheResult
Name | Type | Description |
---|---|---|
result | any | prefetch cache data |