The HTTP Cache stores a response associated with a request and reuses the stored response for subsequent requests. Caches reduce latency and network traffic, as the response is directly returned from the gateway.
Kusk Gateway implements all the complexity of HTTP caching semantics. For more information, read Envoy's HTTP Caching documentation.
Kusk makes caching easy to configure using a simple OpenAPI extension:
The example above caches responses to HTTP GET requests for 60 seconds.
You can also specify different caching settings for a specific operation or path. The following example shows rate limiting configuration for a specific operation:
See all available Caching configuration options in the Extension Reference.