A method and system for caching HTTP POST requested content using standard
caching rules associated with HTTP GET requests are disclosed. When a
POST request is received, it is transformed into a GET request with an
identifying tag. The identifying tag includes an index value that is
unique to the POST request and is based on the POST request's URL and
payload. When the POST request has not been encountered before the POST
request's URL and payload is stored in a data store. The client then
receives a redirect response including the GET request with the
identifying tag that it uses to request the data. When the ensuing GET
request with the identifying tag is received it is determined if the
requested content has been cached. If so, the cached content is returned
to the client. Otherwise, the original POST request is recreated and sent
to the origin server to retrieve the content. The returned content is
sent to the client and is cached using the GET request with the
identifying tag.