How to cache pages that are mostly static but has a "logged in" bar?

Andy nginx-forum at
Mon Apr 25 04:12:42 MSD 2011

I have pages that are generated dynamically but don't change all that
often. Would like to use Nginx to cache those pages.

However every page has a "log in" bar at the top, similar to this forum.
A logged-in user would see his name and a "log out" link. A user who
isn't logged in would see links to "log in" or to "register".

How do I cache a page like this where there is a small element that
needs to be personalized? Normally this is a job for ESI, but Nginx
doesn't support ESI. Any suggestions?


Posted at Nginx Forum:,193466,193466#msg-193466

More information about the nginx mailing list