Module: core/base-service/resource-cache

Methods

(async, inner) getCachedResource(attrs) → {*}

Make a HTTP request using an in-memory cache

Parameters:
Name Type Description
attrs object

Refer to individual attrs

Properties
Name Type Attributes Default Description
url string

URL to request

ttl number

Number of milliseconds to keep cached value for

json boolean <optional>
true

True if we expect to parse the response as JSON

scraper function <optional>
buffer => buffer

Function to extract value from the response

options object <optional>
{}

Options to pass to got

requestFetcher function <optional>
fetch

Custom fetch function

Source:
Returns:

Parsed response

Type
*