-
Notifications
You must be signed in to change notification settings - Fork 173
Open
Description
LedgerDb effectively have 2 types endpoints:
- "live" which should never be cached.
/ledger/slots/latest/aggregated-proofs/latest/
- historical, that can be cached forever (for instant finality, or after finalization):
/ledger/slots/{slotId}/ledger/txs/{txId}- etc..
Currently no Cache-Control headers are set, leaving caching behaviour undefined for clients and intermediaries (CDNs, reverse proxies).
HTTP Header Reference
Historical endpoints
Cache-Control: public, max-age=31536000, immutable
public— cacheable by CDNs and shared proxies, not just the browsermax-age=31536000— 1 year in seconds (practical "forever")immutable— tells clients: don't bother revalidating, this URL's content will never change. Only valid for content-addressed URLs (by hash). Do not use on height-based routes.
Live endpoints
Cache-Control: no-store
no-store — strongest option; response must not be written to any cache at any layer. Prefer this over no-cache (which still stores but revalidates) since stale ledger state is actively harmful.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels