3 ms·
Because `Vary` is part of the response, not the request. So to find out which headers are listed in `Vary`, you have to look up the response. To look up the res
by kentonv 8y ago
Because `Vary` is part of the response, not the request. So to find out which headers are listed in `Vary`, you have to look up the response. To look up the response, you need the cache key. So the cache key cannot depend on `Vary`.
- tedunangst 8y agoThis just means when you look up the response in the cache, it returns not a single response but a set organized by Vary header and you pick the right one. It's not impossible.
- kentonv 8y agoYes that's what I said: > You either have to do a linear scan of all entries for that URL, or you need to maintain some sort of fancy index
- byroot 8y agoOh right. I was only thinking of revalidated requests. Thanks.