Re: Reading ACL configuration files every request

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Sun, 06 Nov 2011 14:17:15 +1300

On 6/11/2011 1:39 p.m., Andrew Beverley wrote:
> Hi,
>
> I am using the ACL feature whereby the parameters can be read from a
> file. For example:
>
> acl session_day time "/var/www/announce_days.txt"
>
> Understandably, the file only appears to be read when the configuration
> file is parsed, rather than each time the ACL is checked. However, I
> need it to be checked more often, as I have a system configuration
> interface that writes a day of the week to the file, which subsequently
> causes a splash page to be shown on a particular day. I would like
> configuration to be done without having to reload the Squid
> configuration file.
>
> Would any consideration be given to a patch to check the ACL file more
> often? Could/should it be an extra configuration option to check the
> file each request? I appreciate that this would come with a greater
> overhead. Is there a better way to achieve this?

A better way currently available would be to use an external_acl helper
to read and response OK/FAIL. You probably want to pass something
relatively static (%PROTO or %METHOD) as the ACL format to reduce the
overheads. With time calculations vs "now" you can ignore the actual
input format.

Or the cache manager interface for POSTing in live configuration updates
which Aurthur T. is working on may be worth looking into.

Amos
Received on Sun Nov 06 2011 - 01:17:38 MST

This archive was generated by hypermail 2.2.0 : Mon Nov 07 2011 - 12:00:12 MST