]> 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)
committerAmos Jeffries <yadij@users.noreply.github.com>
Thu, 23 Feb 2023 12:34:13 +0000 (01:34 +1300)
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 b9dd307301df499f0ef8a9966bf709d05e7a9eb3..46b87c47a25609d0ff80b92d2ec9bda41d58afbc 100644 (file)
@@ -6207,9 +6207,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