On 08/14/2013 01:54 AM, Henrik Nordström wrote:
> tis 2013-08-13 klockan 16:01 -0600 skrev Alex Rousskov:
>>
>>> the urltag approach used in squid-2 could be used here as general
>>> mechanism. It allows http_port or external_acl to add a piece to the
>>> object key.
>>>
>>> This allows splitting cache based on
>>> - port received on
>>> - username
>>> - arbitrary group of IP addresses
>>> - anything else that you can come up with in an external acl
>>
>> Can Store ID be used for this? If the Store ID helper has access to
>> receiving port, user name, IP addresses, etc, the helper can manipulate
>> the store key as needed without any Squid modifications, right?
> Yes. And if it can receive the http_port name then it fully replaces
> urltag from squid-2 in functionality.
store_id_program already documents that the helper may receive arbitrary
key=value pairs. We just need to add a way to configure what additional
info to send to that helper, using the existing %macro mechanism. Adding
something like a store_id_extras directive should do the trick. It would
be similar to request_header_add (with modern quoting),
external_acl_type (with a custom subset of %macros and legacy quoting)
and logformat directives (with legacy quoting):
store_id_extras user="%un" port="%>lp_name" ...
IIRC, there is %>lp but no %>lp_name macro yet. We should add it.
The same changes should apply to the url_rewrite_program helper.
HTH,
Alex.
Received on Wed Aug 14 2013 - 13:23:45 MDT
This archive was generated by hypermail 2.2.0 : Fri Aug 16 2013 - 12:00:11 MDT