Skip to content
VERIFY THAT REQUESTS TO A SERVICE ARE CACHED IN KONG

icon picker
Verify that Requests to the Service are cached in Kong

Now let's verify that requests to the service are cached in Kong.
Run this command at least twice.
http get localhost:8000/ \
host:example.com
Response
The response should look similar to this: Notice the missed cache status. What is the response if you run the command again?
HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *
Connection: keep-alive
Content-Length: 397
Content-Type: application/json
X-Cache-Key: 7bdafa1e074b3b078db0286f92d28854
X-Cache-Status: Miss
X-Kong-Proxy-Latency: 86
X-Kong-Upstream-Latency: 8

{
"args": {},
"data": "",
"files": {},
"form": {},
"headers": {
"Accept": "*/*",
"Accept-Encoding": "gzip, deflate",
"Connection": "close",
"Host": "httpbin.org",
"User-Agent": "HTTPie/1.0.2",
"X-Forwarded-Host": "example.com"
},
"json": null,
"method": "GET",
"origin": "172.19.0.1, 52.201.239.166",
"url": "http://example.com/anything"
}

Next Section


Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.