bn.getBackgroundFetchData
▸ getBackgroundFetchData(options
): Promise
<GetBackgroundFetchDataResult
>
description
Get backgroundFetch cache. If current request is still ongoing this api will return previous cache. If no cache at all this api will reject.
example
Parameters
Name | Type |
---|---|
options | GetFetchDataOptions |
Returns
Promise
<GetBackgroundFetchDataResult
>
#
GetFetchDataOptionsƬ GetFetchDataOptions: Object
Type declaration
Name | Type | Description |
---|---|---|
fetchType | "periodic" | "pre" | Cache data category, with a value of periodic or pre |
#
Interface: GetBackgroundFetchDataResultName | Type | Description |
---|---|---|
fetchedData | string | Cache data |
timeStamp | number | The timestamp of client getting the cached data |
errMsg | string | Error message if there's an error |
path? | string | The route path of mini program |
query? | string | The query data passed to the page |
scene? | number | Scene value of entering page |