@anupamadutta "Do you mean to say that we could serve out gzipped response to non-gzip-compatible requests and vice versa?"

This looked to me like this could, for example, serve out a gzipped version to a user agent that does not support it. But as you say, this is a test template, so it doesn't really matter, but a comment wouldn't hurt? (for when someone uses this as an example on how to set this up). 

Thinking about it, it might actually make sense to only store compressed documents, and try to decompress on the fly for the minority of user agents that don't support it. that would halve the amount of cache alternates. Is that how this is going to work? :-)

I'm also wondering: will it be easy to purge all alternates of a single cached html page in one go?  
And: Will we go to the backend each time we get a request from a user agent with different capabilities?

Re: "So, once this part is added, the proxy_cache_key line will include this piece as well."
Sounds awesome!