The Vary header can change the cacheability of a response. This library could add some helpers to account for it. A dev would probably want to create a cache key based on the headers in Vary
Proposal:
- Add additional return value to
CachableResponse of []string that is the list of headers in the Vary header. E.g. ["Accept-Language", "Accept-Encoding"]
- Add helper to extract headers from a
http.Request based on the Vary list
- Add normalization helpers for certain headers. See https://developer.fastly.com/reference/http/http-headers/Accept-Language/