DVA-C02 · Question #38
A set of APIs are exposed to customers using the Amazon API Gateway. These APIs have caching enabled on the API Gateway. Customers have asked for an option to invalidate this cache for each of the…
The correct answer is C. Ask customers to pass an HTTP header called Cache-Control:max-age=0. https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-caching.html Invalidate an API Gateway Cache Entry A client of your API can invalidate an existing cache entry and reload it from the integration endpoint for individual requests. The client must send a…
Question
A set of APIs are exposed to customers using the Amazon API Gateway. These APIs have caching enabled on the API Gateway. Customers have asked for an option to invalidate this cache for each of the APIs. What action can be taken to allow API customers to invalidate the API Cache?
Options
- AAsk customers to use AWS credentials to call the InvalidateCache API.
- BAsk customers to invoke an AWS API endpoint which invalidates the cache.
- CAsk customers to pass an HTTP header called Cache-Control:max-age=0.
- DAsk customers to add a query string parameter called "INVALIDATE_CACHE" when making an
How the community answered
(34 responses)- A3% (1)
- B3% (1)
- C94% (32)
Explanation
https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-caching.html Invalidate an API Gateway Cache Entry A client of your API can invalidate an existing cache entry and reload it from the integration endpoint for individual requests. The client must send a request that contains the Cache-Control: max-age=0 header. The client receives the response directly from the integration endpoint instead of the cache, provided that the client is authorized to do so. This replaces the existing cache entry with the new response, which is fetched from the integration endpoint. To grant permission for a client, attach a policy of the following format to an IAM execution role
Community Discussion
No community discussion yet for this question.