Cache Statuses
How SuperAPI handles different cache scenarios in your API requests.
Understanding Cache Statuses in SuperAPI
Cache statuses in SuperAPI provide critical information about how your API requests interact with the caching layer. Each request is assigned a specific status that indicates whether it was served from cache, required origin server processing, or was handled in a special way. These statuses appear in response headers to help you understand and optimize your system's performance.
Types of Cache Statuses
Cache HIT
When SuperAPI serves a request directly from its cache, it receives a HIT status. This means the response was delivered without contacting your origin server, resulting in millisecond response times and zero load on your backend systems. The response includes X-SuperAPI-Cache-Status: HIT
to indicate successful cache delivery.
Cache MISS
A MISS occurs when SuperAPI cannot find the requested data in its cache. This happens with first-time requests, after invalidations, when TTL expires, or with unique parameter combinations. SuperAPI forwards the request to your origin, caches the response (if cacheable), and returns it with X-SuperAPI-Cache-Status: MISS
in the headers.
Cache PASSTHROUGH
PASSTHROUGH status indicates SuperAPI intentionally bypassed its cache. This occurs with mutations, explicit bypass requests, configuration rules, certain authenticated requests, or during maintenance. The response includes X-SuperAPI-Cache-Status: PASSTHROUGH
to show the cache was deliberately skipped.