Re: [squid-users] Squid 3.0 icap HIT

From: Steve Hill <steve_at_opendium.com>
Date: Mon, 8 Nov 2010 09:47:50 +0000 (GMT)

On Sat, 6 Nov 2010, Luis Enrique Sanchez Arce wrote:

> When squid resolve the resource from cache does not send the answer to ICAP.
> How I can change this behavior?

You need a respmod_postcache hook, which unfortunately hasn't been
implemented yet. The workaround I use is to run two separate Squid
instances - one of them does all the usual caching stuff and listens only
on [::1]:3129. A second Squid instance runs with caching turned off
entirely, forwarding requests to [::1]:3129. The second squid instance
is configured to talk to the ICAP service. All the clients connect to the
second instance.

My configuration for the non-caching Squid instance that talks to the ICAP
server is here:
https://subversion.opendium.net/trac/free/browser/thirdparty/squid/trunk/extra_sources/squid-nocache.conf

This effectively provides a precache reqmod hook (reqmod_precache) and a
postcache respmod hook (respmod_precache). The caching Squid would
provide the same precache reqmod hook (reqmod_precache) and a precache
respmod hook (respmod_precache), although I don't have a use for these
myself.

Its a bit nasty, but it happens to work. :)

-- 
  - Steve Hill
    Technical Director
    Opendium Limited     http://www.opendium.com
Direct contacts:
    Instant messager: xmpp:steve_at_opendium.com
    Email:            steve_at_opendium.com
    Phone:            sip:steve_at_opendium.com
Sales / enquiries contacts:
    Email:            sales_at_opendium.com
    Phone:            +44-844-9791439 / sip:sales_at_opendium.com
Support contacts:
    Email:            support_at_opendium.com
    Phone:            +44-844-4844916 / sip:support_at_opendium.com
Received on Mon Nov 08 2010 - 09:48:06 MST

This archive was generated by hypermail 2.2.0 : Mon Nov 08 2010 - 12:00:01 MST