Just curious, why are you keeping deflate support? I don’t think there’s any browsers that do deflate that don’t do gzip, these days. And other clients that only do deflate are so rare, giving them the uncompressed version is really not a problem.
Guided by the philosophy that “origin knows best”. Put differently, if we want to disable deflate support, it should be up to the origin, not the edge.
In our case, AFAIK, a cache miss on Accept-Encoding isn’t a huge deal (n! == 6), but it’s easy to see how this can be adapted if it is.
It would be interesting in practice to have a metric on how many permutations are actually cached, and what their hit/miss ratio is. I wonder if there’s a way to check?
been wondering the exact same question for a while now. would appreciate if you would come back with updates if you have found an answer as i see you wrote that 15 days ago. thanks!