On Fri, Feb 27, 2009 at 10:07 AM, Emil Podlaszewski emil@wikia.com wrote:
Not all requests hit the backend if you have squid or varnish in front of your apaches.
They do if you just set a cookie and the response has Vary: Cookie. :) I didn't think about the interaction with Squid, but I don't think it would be disastrous. It would have to cache an extra response: the redirect itself (with the cookie-setting header), and then the target page (with the cookie-unsetting header). Both of these would only be cache hits if the requester's cookies matched the original requester's cookies, so nothing incorrect should be served.
It does add an extra HTTP request, and therefore an extra roundtrip, so it would slow things down a bit regardless of caching, compared to the current method. But that's true for all HTTP redirects.