Opt a GET into the response cache

Goal

Cache idempotent reads at the edge so hot GETs do not consume concurrency slots or hit the upstream on every call.

Why

A cache hit skips admission and the upstream fetch, so repeated GETs do not burn slots. Hits still count toward billing.

Use it when many callers ask for the same idempotent response within a short window. Skip it for one-off or highly personalized reads where reuse is rare.

Steps

  1. Confirm Response cache is enabled on Pools → Concurrency (default on).
  2. Send an unconditional GET or HEAD with a TTL:
curl -sS "https://your-pool.nthpool.cloud/v1/items?page=1" \
  -H "X-Nthpool-Key: $POOL_KEY" \
  -H "X-Nthpool-Cache-TTL: 60"
  1. Repeat the same request (same path, query, caller identity, and origin). Confirm a cache hit in Logs or Metrics.

Gotchas

  • TTL max is 300 seconds.
  • HMAC-signed requests are never cached.
  • Upstream Cache-Control: private|no-store|no-cache, Set-Cookie, Vary, or 206 responses are not stored.
  • Hits still count toward billing request allowance.
  • Each edge location warms its cache on its own, so the first request in a region is always a miss.

See also