Option to disable ETag for certain routes?
Open
5.x
enhancement
- Dominant language
- JavaScript
- Stars
- 69.5k
- Forks
- 25k
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 9
Description
There's a need to disable ETag for certain routes, where it is a GET but the data may still change between requests - and it is mandatory to have no caching on it.
Currently the ETag processing is done after the user's code for the response, so there's no way to remove it _after_ express has added it.
Now if we add a `Cache-Control: no-store`, the client will surely ignore the ETag, but then the ETag is generated for nothing, and it's an extra CRC or MD5 call which can be spared.
So I think there's a need to make the ETag conditional also on the existence of a "no-store".
Contributor guide
Assessment
This issue has not been assessed yet.