In continuation of the answer for the "Nginx Reverse Proxy for Tumblr" question, what is the best way to cache a web-site like Tumblr with nginx, which returns distinct results depending on the User-Agent?
From the one hand, we wouldn't want to keep a distinct cache copy for every possible user-agent string -- that would be insane.
From the other, the information of what parts of the request they use to determine which version to serve, is proprietary, so it's not like we even know what we're dealing with.
What the best way to do the caching with the minimum chance of distinct user-agents polluting and disturbing the cache?