[PATCH] reply_from_cache and reply_to_cache

From: Alex Rousskov <rousskov_at_measurement-factory.com>
Date: Fri, 11 Oct 2013 16:38:58 -0600

Hello,

    The attached patch adds reply_from_cache and reply_to_cache
squid.conf directives to control caching of responses using response info.

The reply_from_cache directive can prevent serving of HITs while
reply_to_cache can prevent storage of MISSes. The two can be combined or
used independently.

As you know, the existing "cache" directive does both at the same time.
However, the "cache" directive is checked before Squid has access to the
response and, hence, could not use response-based ACLs such as
http_status. Response-based ACLs may be essential when fine-tuning
caching. Squid Bug 3937 (StoreID can lead to 302 infinite loop) is a
good use case.

The patch also updates old "cache" directive documentation to provide
more information, to help folks distinguish the three related
directives, and to polish for clarity.

Caution: reply_from_cache is one more case that can trigger bug 3480
segfaults.

Thank you,

Alex.

Received on Fri Oct 11 2013 - 22:39:03 MDT

This archive was generated by hypermail 2.2.0 : Sat Oct 12 2013 - 12:00:11 MDT