]> git.ipfire.org Git - thirdparty/squid.git/commit - src/client_side_request.cc
Add custom Store ID code support
authorEliezer Croitoru <eliezer@ngtech.co.il>
Fri, 8 Feb 2013 09:25:04 +0000 (02:25 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 8 Feb 2013 09:25:04 +0000 (02:25 -0700)
commita8a0b1c2ae84779983a9e27f24e0f16811dcd52c
treef5eba6caf5aa1dc5fe072eb4bac209c9a0cc3f15
parent04632397988b3107be03d927ae67c8b9813a2171
Add custom Store ID code support

This is a port of the StoreURL feature from Squid-2.7 rewritten to avoid
the unfortunate link that 2.7 feature had with URL-rewriting.

The feature uses a helper to retrieve custom ID values for use in the
cache storage ID key. The default ID used is the requested URL.

Differences since 2.7:
* storeurl_* directive names are now called store_id_*

* The helper response now expects 'OK store-id="..."\n'
  However the squid-2.7 response syntax is still accepted.

* the ID value presented need not be a URL. Although URL syntax
  is recommended to simplify store log interpretation and
  refresh pattern matching.

* refresh_pattern applies to the store ID, not the request URL.

TODO: support store ID lookups on ICP and HTCP queries.
15 files changed:
src/ClientRequestContext.h
src/HttpRequest.cc
src/HttpRequest.h
src/SquidConfig.h
src/cache_cf.cc
src/cf.data.pre
src/client_side_reply.cc
src/client_side_reply.h
src/client_side_request.cc
src/client_side_request.h
src/redirect.cc
src/redirect.h
src/store.cc
src/store_key_md5.cc
src/store_swapmeta.cc