I need to cache my home page, this far no prob, using reverse proxy is good enough
But I also need to include the header part with standalone (ESI) , so that I can check if user is connected and show his info "hello Vincent".
The problem is that if I do so, the home page (as every page) will have to test the session, and as I use PDO storage, I can see 2 query running on MySQL for every user/page.
So I tried to add a simple "is_connected" cookie, and check for its absence to render the logged-out version without asking session, but it seems that as long as I have a firewall letting anonymous user it will ask for session.
I'm running out of idea, I'd like to see what people do for this, the goal is no query at all on home page.
thanks