tproxy caching?

From: Adrian Chadd <adrian@dont-contact.us>
Date: Sun, 20 Jan 2008 16:00:10 +0900

I've got tproxy + squid-2.7 here and I noticed that some stuff wasn't
being cached after I unsubtly made the content cachable.

The problem is "repaired" here:

Index: forward.c
===================================================================
RCS file: /cvsroot/squid/squid/src/forward.c,v
retrieving revision 1.131
diff -u -r1.131 forward.c
--- forward.c 5 Sep 2007 20:03:08 -0000 1.131
+++ forward.c 20 Jan 2008 06:47:17 -0000
@@ -712,7 +712,7 @@
      * peer, then don't cache, and use the IP that the client's DNS lookup
      * returned
      */
- if (fwdState->request->flags.transparent && fwdState->n_tries && (NULL == fs->peer)) {
+ if (fwdState->request->flags.transparent && (fwdState->n_tries > 1) && (NULL == fs->peer)) {
        storeRelease(fwdState->entry);
        commConnectStart(fd, host, port, fwdConnectDone, fwdState, &fwdState->request->my_addr);
     } else {

The problem is that n_tries is always going to be 1 at this point, even before
it attempts a new connection, and stuff is just suddenly uncachable.

Am I on the right track?

Adrian

-- 
- Xenion - http://www.xenion.com.au/ - VPS Hosting - Commercial Squid Support -
Received on Sat Jan 19 2008 - 23:50:05 MST

This archive was generated by hypermail pre-2.1.9 : Wed Jan 30 2008 - 12:00:09 MST