RECIPE / CACHING
ETag and Conditional GET
Cut bandwidth and latency by letting clients ask “has anything changed?” instead of redownloading the full payload. Meridian endpoints support strong ETags and the If-None-Match header for cheap revalidation against the model catalog, billing snapshots, and image listings.
01.How ETags work
On every 200 OK, Meridian returns an ETag header containing a hex digest of the response body. Clients store the value and replay it on the next request as If-None-Match. If the resource has not changed, the server responds 304 Not Modified with an empty body.
02.Example exchange
# First request GET /v1/models HTTP/1.1 Host: llm.getnimbus.net Authorization: Bearer sk-nimbus-... HTTP/1.1 200 OK ETag: "9b2c4f1a7e3d" Cache-Control: private, max-age=60 Content-Type: application/json # Revalidation GET /v1/models HTTP/1.1 Host: llm.getnimbus.net Authorization: Bearer sk-nimbus-... If-None-Match: "9b2c4f1a7e3d" HTTP/1.1 304 Not Modified ETag: "9b2c4f1a7e3d"
03.When to use it
- •Polling the model catalog from a dashboard sidebar.
- •Pulling billing snapshots into a customer admin tool.
- •Refreshing generated image lists between renders without rehydrating thumbnails.