]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Documentation: Polish "refresh_pattern percent" description (#1260)
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 5 Feb 2023 21:00:38 +0000 (21:00 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Mon, 6 Feb 2023 09:09:24 +0000 (09:09 +0000)
The original text contained a "last modification age" typo and was
misinterpreted by some admins as if Squid applied the configured percent
to the current object age.

The text also did not make it clear that the percent-based heuristic is
effectively only applied to responses with a Last-Modified header (in
addition to the usual "without an explicit expiry time" precondition).

src/cf.data.pre

index 5d39f4fbb72cd4c9225dd15b343e171e7acca31c..d95f31dc021332cb376f3b1f03808a7ddd9461db 100644 (file)
@@ -6454,9 +6454,9 @@ DOC_START
        to be erroneously cached unless the application designer
        has taken the appropriate actions.
 
-       'Percent' is a percentage of the objects age (time since last
-       modification age) an object without explicit expiry time
-       will be considered fresh.
+       'Percent' is used to compute the max-age value for responses
+       with a Last-Modified header and no Cache-Control:max-age nor Expires.
+         Cache-Control:max-age = ( Date - Last-Modified ) * percent
 
        'Max' is an upper limit on how long objects without an explicit
        expiry time will be considered fresh. The value is also used