What you will have at the end
A Route, catalog-api, whose GET responses are stored on the gateway node for 60 seconds. The first request for a path reaches the backend; the next ones for the same path are answered from the cache without a backend call, which the backend’s own log confirms. A query parameter lets a client skip the cache, a POST is never served from it, and once the 60 seconds pass the next request fetches a fresh copy. Every answer carries a cache status header that says which of these happened, and Traffic Explorer shows a cached answer with gateway as the Upstream node and no backend time.
Prerequisites
- A Route to a backend that answers GET. Here
catalog-apiserves/catalog/*from the Upstreamhttpbin-backend, an echo service athttpbin:8080whose log prints every request it receives, so the article can count backend calls. The Route rewrites/catalog/…to the service’s/anything/…path withproxy-rewrite. - Traffic logging turned on under Traffic Explorer › Settings, and a role that may manage Routes. The screenshots below were taken as
nora.becker.
Where the copy lives and for how long
Open the Route, select the Plugins tab, Add plugin, and choose proxy-cache from the catalog. Under Basics:
- Cache strategy:
memory. The other choice,disk, keeps the copies on the node’s disk; the note under the field says what else changes with it: under disk the lifetime of a stored response comes from the gateway’s own cache configuration, not from this Plugin, which is why the lifetime field is drawn under memory alone. - Cache TTL: 60 seconds. A catalog that changes a few times a day could hold its copies much longer; the article keeps it short so the expiry can be shown.
- Cache control stays off. On, the Plugin obeys the backend’s own
Cache-ControlandExpiresheaders instead of the TTL, and a response without them is never stored. - Cache set cookie stays off: a response that carries
Set-Cookieis never stored, which keeps one user’s session out of another user’s answer. - Cache zone:
memory_cache, the zone the gateway declares for the memory strategy. The note under the field says the zones that exist as shipped,disk_cache_onefor disk andmemory_cachefor memory, and that any other name is refused on save. - Cache key:
$hostand$request_uriwhen new, so one copy per host and full path including the query string. A header or a query parameter can be added as a further part,$http_accept_languagefor a catalog that answers in several languages; the note says a variable the request lacks adds nothing to the key.

One thing the form does not say and the operator should know: the cache lives on each gateway node, in that node’s memory or on that node’s disk. An Environment with two nodes warms two caches, and a copy stored on one node is not served by the other.
Which requests are cached, and how to skip the cache
Under Behavior:
- Cached request methods:
GETandHEADwhen new.POSTcan be ticked for a backend whose POSTs are reads; it is not here. - Cached response statuses:
200,301and404when new. A 404 for a product that does not exist is a valid thing to cache for 60 seconds. - Cache bypass:
$arg_refresh. The note explains the rule: the cache is skipped when the parts join into anything but empty or0. A request with?refresh=1therefore goes to the backend; a request without the parameter reads the cache. - No cache is the other side: the response is not stored when its parts are set. It stays empty here.
- Consumer isolation stays on: each Consumer gets its own entries, so an answer cached for one caller is not served to another.

Select Add plugin. The Route update is in the audit log with the proxy-cache block as the difference.
What a client sees
Three GETs for the same path, one after the other:
curl -i http://localhost:9281/catalog/items
GET 1 → Apisix-Cache-Status: MISS
GET 2 → Age: 0 cache status: HIT
GET 3 → Age: 0 cache status: HIT
backend calls for /anything/items: 1
The cache status header, shown above under the name the engine gives it, reads MISS on the first answer and HIT on the next two, and the backend’s log has one line for the three requests. Age is how old the copy is, in seconds.
The bypass parameter and a POST both reach the backend:
GET ?refresh=1 → cache status: BYPASS
POST → cache status: MISS
A POST is MISS every time, because the method is not in the cached list and nothing is stored for it. A HEAD got a 404 from the gateway in this measurement, with no route matched in Traffic Explorer: the Route accepts GET and POST only, which the cache settings cannot override.
After the TTL:
GET after 60 s → cache status: EXPIRED
EXPIRED means the copy was there, too old, and replaced by a fresh answer from the backend; the backend’s log shows the call. Over the whole run the backend answered three GETs: the first one, the bypass, and the one after the expiry.
What Traffic Explorer shows
Every request above is a record, cached or not. Open Observe › Traffic Explorer and search for the path. The two cached answers carry gateway as the Upstream node and 0 ms, because no backend was asked; the first GET, the bypass, the POST and the GET after the expiry carry the backend’s address and its time.

The Upstream’s Analytics counts only the requests handed to a node, so a cache in front of it shows as the gap between the Route’s count and the Upstream’s.
What the audit log keeps
Adding proxy-cache is a Route update: who, when, which Route, and the Plugin block as the difference, with the TTL, the zone, the bypass rule and the strategy on the after side. There is no secret in this Plugin, so nothing is masked.

What to do next
- Give the backend its own breathing room on top of the cache: Rate limiting per Consumer.
- Put a second version behind the same cached Route: Canary releases with traffic-split; and decide what the records of this Route may hold: Masking tokens and card numbers, which reuses
catalog-api. - The traffic Plugins side by side, with the form each one draws, are in the capabilities reference and on API Gateway; the solution page is Rate limiting and traffic management.