Re: RFC7234: Can a request body form part of a "cache key"?

> On Jul 27, 2016, at 8:18 AM, Graham Leggett <minfrin@sharp.fm> wrote:
> 
> Hi all,
> 
> RFC7234 states the following with respect to cache keys for methods other than GET:
> 
> "However, it is also possible to cache [...] responses to methods other than GET if the method's definition allows such caching and defines something suitable for use as a cache key.”
> 
> Could an RFC7234 compliant cache use a request body as part of the cache key, if it was so defined for a particular method?

Yes.

> Concrete example: If a cache cached a PROPFIND request keyed against a request body and URL, would that be RFC7234 compliant? Same for a SEARCH request?

Yes (assuming the PROPFIND response is marked cacheable) and Yes (ditto).
The problem is ensuring that the body is sufficiently limited so that it
won't be unique per request.

Caches that do not support this kind of caching should simply pass the
request/response through unharmed. Actual mileage may vary.

Cheers,

....Roy

Received on Wednesday, 27 July 2016 17:13:31 UTC