On 25/05/11 22:32, Rafal Zawierta wrote:
> Hello,
>
> Could anybody explain me how does work caching in external helper mechanism?
>
> I use suiqd3 (3.1.6) on debian.
>
> I've wrote simple helper - it make sql query to sqlide db - something like that:
>
> helper.sh:
> #!/bin/sh
>
> while read a; do
> x=`sqlite /etc/squid3/db.sql "select * from user where login=\"$a\";"`
>
> if [ -n "$x" ] ; then
> echo 'OK'
> else
> echo 'Err'
> fi
That should be upper case 'ERR'.
>
> And in squid.conf I have:
> external_acl_type logins %LOGIN /opt/squid/helper.sh
> acl logins_acl external login
>
> And so on.
>
> In general - it works fine. If someone is in my database - traffic is
> allowed, if not - denied.
> But when I make update into my database, I have to restart whole squid
> to see changes. Is it possible to make it work without restarting
> squid?
Configure the ttl= value for the lookup results to something less than
an hour. http://www.squid-cache.org/Doc/config/external_acl_type/
Also, you may want to look at using the squid_db_auth helper installed
with Squid. It can handle any database which perl has a DBI module for.
http://www.squid-cache.org/Versions/v3/3.2/manuals/basic_db_auth.html
Amos
-- Please be using Current Stable Squid 2.7.STABLE9 or 3.1.12 Beta testers wanted for 3.2.0.7 and 3.1.12.1Received on Wed May 25 2011 - 12:09:09 MDT
This archive was generated by hypermail 2.2.0 : Wed May 25 2011 - 12:00:03 MDT