Re: Variants and Client Hints

> On Jun 12, 2018, at 11:27 PM, Mark Nottingham <mnot@mnot.net> wrote:
> 
> 
>>> That said, the syntax of Variant-Key now allows a response to match multiple keys, which at least helps in the duplication issue; see the last part of:
>>>  https://httpwg.org/http-extensions/draft-ietf-httpbis-variants.html#variant-key
>> 
>> I agree that's better, but still, the response for `DPR: 2, Viewport: 300`, `DPR:1, Viewport: 600` and `DPR: 2, Viewport: 600, Save-Data: on` could be one and the same. Avoiding that cache duplication can be an important factor.
> 
> Right, but that response would have on it something like:
> 
> Variants: DPR;1;2, Viewport;600;1200, Save-Data;on;off
> Variant-Key: 1;2, 600, on;off
> 
> If that's not expressive enough, maybe we should be talking about a Variant-Key syntax that lets you specify alternative sets of values, e.g.,
> 
> Variants: DPR;1;2, Viewport;300;600, Save-Data;on;off
> Variant-Key: 2;300;off, 1;600;off, 2;600;on



This seems rather convoluted, almost aching to the complexity of the old “Key” draft. And now instead of having one secondary cache key, I might have 3 (or <n>) that I must look up? I agree that deduping in the cache is admirable, but perhaps that is an implementation detail for the caches or services?

Cheers,

— Leif

Received on Tuesday, 10 July 2018 16:32:34 UTC