Re: [squid-users] Basic question on refresh_pattern

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Mon, 25 Mar 2013 23:16:26 +1300

On 25/03/2013 6:47 p.m., csn233 wrote:
> refresh_pattern ^ftp: 1440 20% 10080
> refresh_pattern ^gopher: 1440 0% 1440
> refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
> refresh_pattern . 0 20% 43200
>
> From my understanding of regex, the first one refers to any URL
> starting with ftp, the second any URL starting with gopher, the third
> any URL that contains "cgi-bin" or "?" (case insensitive).
>
> But what does the "." in the last line mean? In regex, AFAIK, it
> stands for a single character? So what does it mean in this case?

Since all URLs are one or more bytes long it always matches, ie "any URL".

But don't confuse that for meaning the pattern applies on *all* URLs. It
only matches when refresh_pattern is applied and only if no earlier
pattern matched the URL.

Amos
Received on Mon Mar 25 2013 - 10:16:31 MDT

This archive was generated by hypermail 2.2.0 : Mon Mar 25 2013 - 12:00:06 MDT