How to Cache dynamic content using Nginx when sessions are involved?

Solution 1:

I think you'll be better off looking at Varnish for this, nginx has very limited caching functionality.

With nginx you can detect cookie data and use that to force the user a different cache key as shown here, but this probably isn't enough for what you want to do.