I have an API Gateway and a lambda which query on it. I have set the cache ttl on the API Gateway to the maximum (3600).
I'm testing the API from Postman. My cache is working as querying multiple time the exact same url returns me the result quite fast.
On some conditions, I need the lambda to invalidate the cache for a specific key. So I deactivated "require authorization" under "Per-key cache invalidation" in the API Gateway stage editor, and I'm trying with Postman to do the same query and adding "Cache-Control: max-age=0" header as written here under the "Invalidate an API Gateway Cache Entry" section.
http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-caching.html
However, my cache doesn't seem to empty as querying multiple times is still as fast.
Postman silently overrides "Cache-Control" header value to "Cache-Control: no-cache". You are able to see it when press "Code" button. Try to use other tool, curl for instance.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With