Assigned
Status Update
Comments
ku...@google.com <ku...@google.com>
ku...@google.com <ku...@google.com> #2
Hello,
Thank you for reaching out to us with your request.
We have duly noted your feedback and will thoroughly validate it. While we cannot provide an estimated time of implementation or guarantee the fulfillment of the issue, please be assured that your input is highly valued. Your feedback enables us to enhance our products and services.
We appreciate your continued trust and support in improving our Google Cloud Platform products. In case you want to report a new issue, Please do not hesitate to create a new issue on the
Once again, we sincerely appreciate your valuable feedback; Thank you for your understanding and collaboration.
Description
Please provide as much information as possible. At least, this should include a description of your issue and steps to reproduce the problem. If possible please provide a summary of what steps or workarounds you have already tried, and any docs or articles you found (un)helpful.
Problem you have encountered:
When I set a "Cache-Control: public, max-age=86400" response header on my endpoint that is served by a 2nd generation cloud function, the API gateway is caching the response. When I change my endpoint to set the "Cache-Control: no-cache" response header, the API gateway continues to return the original response, despite the change in cache header.
What you expected to happen:
The API Gateway should not be caching responses because this is not described anywhere in the documentation. If it does cache responses, it should respect the "Cache-Control: no-cache" header from the endpoint and stop caching the response.
Steps to reproduce:
1. Create an API gateway with an endpoint with a 2nd generation cloud function as the backend
2. The endpoint served by the cloud function should set the "Cache-Control: public, max-age=86400"
3. Deploy the endpoint and verify the response contains the "Cache-Control: public, max-age=86400" header
4. Deploy a change to the endpoint, changing the response body, and replacing the "Cache-Control: public, max-age=86400" header with "Cache-Control: no-cache".
5. Observe that the response from the cloud function's direct URL has changed to contain the "Cache-Control: no-cache" header, but the response from the api gateway URL continues to be the old response with the "Cache-Control: public, max-age=86400" header.
Other information (workarounds you have tried, documentation consulted, etc):
The only way I could clear the cache was to deploy a new gateway with the same api spec.