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
- Confirm Response cache is enabled on Pools → Concurrency (default on).
- Send an unconditional
GETorHEADwith 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"- 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, or206responses 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
- Concurrency (pool-level response cache toggle)
- Pools