I setup an API Gateway with a Lambda Proxy and set caching on my staging URL using the Stage Editor Settings in API Gateway. Currently I have the Method Request caching the request path proxy
.
I have noticed that GET requests work for my API and are individually cached. However when I do two POST requests sequentially with different JSON payloads. The Cache will be set for the first response data and then not realize that the second request has completely different payload and return the first response again. When the response data is completely different.
Is there a way to tell API Gateway to use the JSON payload as a cache key for POST method?