Reverse proxy for site with two perspectives
I am working my way through setting up Squid for the first time, and
have some questions that I have not been able to find answers for
online. My server running Squid is acting as a reverse proxy for a
database driven website. Although almost all of the website pages are
dynamically generated and database driven, they are not updated more
than once daily. A reverse proxy cache set to cache pages for 24 hrs
should be effective at reducing strain on web server and the
database. I have already successfully implemented this functionality.
This specific web application allows users to log-in using credentials
stored in the database. Depending on whether a user has logged in,
the site shows retail or wholesale prices at the same URL. I am
looking for a way to cache this site for both of these two
perspective, the logged in user and the guest. Has anyone experienced
a scenario like this before?
I've tried to think of some possible solutions, but haven't come up
with anything practice. Is it possible for Squid to cache pages based
not just on the location but on an html header as well (ex: cookie)?
I need some way to distinguish logged in users and guest users and
show them two cached variations of the same page. I have a feeling
there must be some way to accomplish this, albeit I'm sure it's tricky
If needed, I can adapt how the site's back end authentications works
to better agree with Squid's abilities - but would prefer not to.
Thanks in advance for the help -