JavaScript required
We’re sorry, but Coda doesn’t work properly without JavaScript enabled.
Skip to content
Gallery
IMPROVE PERFORMANCE WITH PROXY CACHING
IMPROVE PERFORMANCE WITH PROXY CACHING
KONG ADMIN API
KONG MANAGER
KONGratulations
More
Share
Explore
VERIFY THAT REQUESTS TO A SERVICE ARE CACHED IN KONG
Configure Proxy-Cache for a Service
Configure the plugin on a Service by making the following request:
http post localhost:8001/services/httpbin/plugins \
name
=
proxy-cache
\
config:
='{"
strategy
": "
memory
"}'
Response
The response should look similar to this:
HTTP/1.1 201 Created
...
...
{
"config": {
"cache_control": false,
"cache_ttl": 300,
"content_type": [
"application/json"
],
"memory": {
"dictionary_name": "kong_cache"
},
"request_method": [
"GET",
"HEAD"
],
"response_code": [
200,
301,
404
],
"strategy": "memory"
},
"created_at": 1544528666000,
"enabled": true,
"id": "91cff269-21d7-4c5a-86ad-28aad6529146",
"name": "proxy-cache",
"service_id": "7318e74b-6f26-4532-9649-c4a51e1a73f0"
}
Next Section
Verify that Requests to the Service are cached in Kong
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
Ctrl
P
) instead.