What each response allows
private means shared caches, such as a corporate proxy or a CDN, must not store the response: it was produced for your key.
For records, the most reliable cache is your own store, updated from the changes feed or by polling ids in batches. HTTP caching helps when you re-read individual records.
Conditional requests
Retrieve returns a weakETag, a hash of the response body:
If-None-Match. If the record has not changed, the answer is 304 Not Modified with no body, repeating ETag, Cache-Control and Vary:
updated_at, so a register reload invalidates every ETag in that register even when nothing visible changed.
ETags depend on the exact request. A retrieve with include=goods_services has a different ETag from the same record without it; keep one cache entry per URL.
Compression
Responses of 1 KB or more are compressed with gzip when the request allows it. SendAccept-Encoding: gzip: most HTTP libraries do this by default, and with cURL use --compressed. Search and batch responses compress well, often to a fifth of their size.
Don’t cache errors
Error responses areno-store. A 503 or 429 says something about this moment; retry it as described in Handling errors, and never serve a cached error to your own users.