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@xxxxxxxxxxxx
Email: steve@xxxxxxxxxxxx
Phone: sip:steve@xxxxxxxxxxxx
Sales / enquiries contacts:
Email: sales@xxxxxxxxxxxx
Phone: +44-844-9791439 / sip:sales@xxxxxxxxxxxx
Support contacts:
Email: support@xxxxxxxxxxxx
Phone: +44-844-4844916 / sip:support@xxxxxxxxxxxx