Name

refresh_pattern

Synopsis

This directive provides a way to customize Squid’s algorithm for validating cached responses. HTTP has a relatively complex procedure for determining whether or not a cached response is fresh or stale. In some cases, origin servers provide an explicit expiration time. However, the majority of responses don’t have this information. For these, Squid applies some heuristics to the response. See Section 7.7 for more information.

Syntax

refresh_pattern regex 
                              mintime 
                              percent 
                              maxtime [options]

Default

refresh_pattern .  0  20%  4320

Example

refresh_pattern \.jpg$ 0 75 7200

Get Squid: The Definitive Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.