Systems and methods for caching HTTP post requests and responses
First Claim
1. A system comprising:
- a processor; and
memory coupled to the processor and storing instructions that, when executed by the processor, cause the system to;
store cache keys and responses in a proxy cache for POST requests that are determined to be idempotent to enable cache hits for subsequent matching idempotent POST requests;
receive a POST request;
generate, in response to receiving the POST request, a digest of a body of the POST request;
append a URL of the POST request with the digest;
generate a cache key using the URL with the appended digest;
determine that the POST request is non-idempotent by configuring URLs and patterns in the proxy cache; and
in response to the determination that the POST request is non-idempotent, forward the non-idempotent POST request to a server.
2 Assignments
0 Petitions
Accused Products
Abstract
With an idempotent POST request, the URL (and headers) cannot be used as an HTTP cache key. To cache idempotent POST requests, the POST body is digested and appended the URL with the digest and used as the cache key. Subsequent requests with the same payload will end up hitting the cache rather than the origin server. A forward cache proxy at the client end and reverse cache proxy at the server end are deployed. The client sends the request to the forward proxy that looks up the cache. If there is a cache miss, the forward cache proxy digests the body and sends only the digest to the reverse proxy. The reverse cache proxy looks up request cache to find if there is a match for the request and send that request to the server.
-
Citations
18 Claims
-
1. A system comprising:
-
a processor; and memory coupled to the processor and storing instructions that, when executed by the processor, cause the system to; store cache keys and responses in a proxy cache for POST requests that are determined to be idempotent to enable cache hits for subsequent matching idempotent POST requests; receive a POST request; generate, in response to receiving the POST request, a digest of a body of the POST request; append a URL of the POST request with the digest; generate a cache key using the URL with the appended digest; determine that the POST request is non-idempotent by configuring URLs and patterns in the proxy cache; and in response to the determination that the POST request is non-idempotent, forward the non-idempotent POST request to a server. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)
-
-
17. A method comprising:
-
storing cache keys and responses in a proxy cache for POST requests that are determined to be idempotent to enable cache hits for subsequent matching idempotent POST requests; receiving a POST request by a computer system; in response to receiving the POST request, generating, by the computer system, a digest of a body of the POST request; appending, by the computer system, a URL of the POST request with the digest; generating a cache key using the URL with the appended digest; determining that the POST request is non-idempotent by configuring URLs and patterns in the proxy cache; and in response to the determination that the POST request is non-idempotent, forwarding, by the computer system, the non-idempotent POST request to a server.
-
-
18. A non-transitory computer-readable medium storing instructions that, when executed by a computer system, cause the computer system to perform operations comprising:
-
storing cache keys and responses in a proxy cache for POST requests that are determined to be idempotent to enable cache hits for subsequent matching idempotent POST requests; receiving a POST request; in response to receiving the POST request, generating a digest of a body of the POST request; appending a URL of the POST request with the digest; generating a cache key using the URL with the appended digest; determining that the POST request is non-idempotent by configuring URLs and patterns in the proxy cache; and in response to the determination that the POST request is non-idempotent, forwarding the non-idempotent POST request to a server.
-
Specification