Jetron TicketFluid

Caching & ETags

Conditional requests with ETag and If-None-Match.

The host and event read endpoints support conditional requests, so you can poll for changes cheaply:

  • GET /host
  • GET /events and GET /events/{slug}
  • GET /events/{slug}/gallery, GET /events/{slug}/sponsors and GET /events/{slug}/moments

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
}

getHost(), getEventGallery(), listSponsors() and listMoments() accept the same ifNoneMatch option, so each part of an event page can be revalidated independently.

See Conditional requests for the SDK guide.

What is never cached

Tickets, add-ons, sales, promo code checks, reservations, and orders are never cached. Only the endpoints listed above participate in ETag caching. Responses are private: cache per user, not in a shared cache.

On this page