Open gajus opened 4 years ago
The spec says:
https://tools.ietf.org/html/rfc7231#section-6.4.2
A 301 response is cacheable by default; i.e., unless otherwise indicated by the method definition or explicit cache controls (see Section 4.2.2 of [RFC7234]).
So caching it would be a good idea indeed. It can probably be similar setting to the default cache time heuristic.
Currently 301 redirects are not cached at all unless the website returns a satisfying
cache-control
header. This is not how browsers work.https://stackoverflow.com/questions/9130422/how-long-do-browsers-cache-http-301s
There should be a setting to cache 301 redirects for an arbitrary default time.