Search squid archive

Re: Re: Automatic StoreID ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/14/2014 02:36 AM, Eliezer Croitoru wrote:
> Adding a domain or acl test for internal squid StoreID feature to allow
> it run faster but with a patch to the sources.
> 
> I was thinking about adding the code to the StoreID reply section on a
> ERR case while another flag is being used to allow this option and note
> that it will not work when using an external helper.

You can add a new store_id_map directive. I do not think it should
depend on store_id_program actions. The two options do not even have to
be mutually exclusive: if store_id_map does not match, check
store_id_access.

  store_id_map <filename with a regex map> acl1 acl2 ...


> how a about reading the perl DB into squid internals?

If you do something like that, I urge you to revise the current regex
map file syntax used by a popular StoreID script to allow for comments
(if not already allowed) and to contain complete substitution patterns
instead of space-separated from/to tokens:

    # comment
    s/replace this/with that/flags
    s@can use custom delimiters and other regex features@as needed@g
    ^this line is an invalid line example$

To minimize confusion, you can even require that the map file starts
with some well-defined prefix. For example:

  #Store ID Map
  #Version: 1.0

This approach will allow this feature to evolve as needed.


> What exists inside squid code that can help me work with regex
> extraction and match stuff?
> maybe use an acl like code?
> 
> pointers are welcome.

  $ fgrep -RI regcomp src


HTH,

Alex.





[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux