- answers in milliseconds and never becomes an async job,
- keeps answering when the source is down or in maintenance,
- searches everything the source has published, not one record per call,
- spends 1 credit per request instead of the live 10 (see Credits).
as_of
Every dataset-served response carries as_of: the data is current up to that
moment.
Lookups
A third answer mode sits between the two. A lookup endpoint reads one record by its key. The first time a key is asked, Croma reads the source and keeps the answer; every call within the endpoint’s freshness window answers from that copy in milliseconds and spends nothing at the source; past it, the source is read again. Croma also re-reads stored answers on a schedule, so a value the source changes on its own calendar is caught up with. Every lookup response says when the source was last asked and where the answer came from:served_from is copy (answered from Croma’s copy), upstream (the source
was read for this call) or stale (the source could not be read and the
stored answer stood in, with a warning). A key the source has nothing under
returns found: false and is asked of the source again next time. Lookup
endpoints carry the Lookup pill in their guide and served_from: "lookup" in the catalog, and are metered as live requests.
Which endpoints are dataset-served?
The Dataset pill in each guide and
served_from in the
/catalog are always current.
Live lookups
The other answer mode: the source itself, queried at request time.