[squid-users] Caching redirection return values?

From: <sean.upton@dont-contact.us>
Date: Wed, 09 Jan 2002 11:41:33 -0800

I am using Squid as an accelerator, and I'm using a setup that requires a
redirector because my application server's (Zope) built-in HTTP server uses
path rewrites instead of host headers to support virtual hosting. This
works out nicely, but I'm looking into the possibility of trying to cut out
some of the inefficiency in sending the same URL through the redirector time
and time again, when the redirector is going to spit out the same rewritten
path every time. I use a redirector written in an interpreted language
(Python), and I don't particularly want to give up the flexibility and
simplicity that that provides.

How difficult would it be to hack Squid to cache (in memory) results of
redirector lookups in the simplest possible manner? I've been looking
through redirect.c source, and it seems that this should be possible
(perhaps keep some sort of global hash containing original URL as a key,
along with a new URL and expiration timestamp), but I'm trying to get an
idea as to how extensive of a change this would need to be (I still have yet
to look through helper.c and fully comprehend what is going on here). Has
anybody done this already, or have any ideas in this regard?

I can't imagine that this sort of thing would be useful to folks who use a
redirector for other uses, but for this use case, I imagine that this sort
of hack might markedly increase performance for frequently accessed URLs.

Thoughts?

Sean

=========================
Sean Upton
Site Technology Supervisor
Development & Integration
SignOnSanDiego.com
The San Diego Union-Tribune
619.718.5241
sean.upton@uniontrib.com
=========================
Received on Wed Jan 09 2002 - 12:39:33 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:05:48 MST