Jetron TicketFluid

Caching & ETags

Conditional requests with ETag and If-None-Match.

Event read endpoints (GET /events and GET /events/{slug}) support conditional requests so you can poll for changes cheaply.

How it works

Each response includes an ETag header (an opaque validator for the response body) plus a Cache-Control policy like:

Cache-Control: private, max-age=60, stale-while-revalidate=120

On your next request, echo the ETag back in the If-None-Match header.

If nothing changed, the API responds 304 Not Modified with no body, so keep using your cached copy. Otherwise you get a fresh 200 with a new ETag.

curl https://fluid.jetronticket.com/api/v1/events/my-event \
  -H "Authorization: Bearer jt_public_..." \
  -H 'If-None-Match: "the-previous-etag"'

With the SDK

Every ApiResult exposes etag and notModified:

const first = await client.getEvent('my-event')

const next = await client.getEvent('my-event', {
  ifNoneMatch: first.etag ?? undefined,
})

if (next.notModified) {
  // 304: next.data is null, reuse first.data
}

See Conditional requests for the SDK guide.

What is never cached

Reservations and orders are never cached. Only the event read endpoints participate in ETag caching. Responses are private: cache per user, not in a shared cache.

On this page