Builder

Collects the settings of an Endpoint. Not thread-safe; use it only inside the factory's lambda. Stable Core. Further optional settings, when they exist, are added here rather than to the factory's parameter list.

Properties

Link copied to clipboard
var cost: Int

The budget units one call charges; 1 by default. At least 1.

Link copied to clipboard
var lane: Lane

The lane calls are charged to by default; Lane.Interactive by default.

Link copied to clipboard

How long a confirmed miss is stored. Unless a value is set, it is the smaller of ttl and CachePolicy.DEFAULT_MISS_TTL (60 s), read at the moment of the read, so a miss is never stored longer than a value would be unless the consumer says so. Not negative.

Link copied to clipboard

A display name for logs; the endpoint's id by default. Not blank.

Link copied to clipboard

How long a decoded value is stored; Duration.ZERO by default (in-flight loads coalesce, nothing is stored). Not negative.

Functions

Link copied to clipboard
fun misses(vararg statuses: Int)

Declares statuses that mean "nothing there": the call returns Lookup.Missing, stored for missTtl. Repeated calls accumulate; none by default. A status is in 100..599 and never 429 (a 429 is always a throttle).