Caching stores previously obtained responses so later requests can avoid contacting the original provider, reducing load and latency. In synchronous service communication, it can also help a caller return a useful response when a downstream service is unavailable. section 8.2.4
In API composition, a provider proxy can cache service responses and query its cache when the provider is unavailable. Because clients often need fresh data, caching is more useful here as a fallback than as a routine response path. Cached data may be stale, and the proxy needs a meaningful cache key. section 12.3.3
Order details during a service outage
If the Delivery Service is unavailable, an API gateway serving an order endpoint can return cached delivery information instead of leaving that part of the response unavailable. section 8.2.4
Figure 8.8 An API gateway that implements an endpoint using API composition can use the fallback pattern to return a useful response even when one or more of the services it calls are unavailable. For example, if the Delivery Service is unavailable, the GET /orders/{orderId} endpoint can return a response containing either empty or cached delivery information.
Shows an API-composition response using empty or cached delivery information when the Delivery Service is unavailable. section 8.2.4
















































