Search squid archive

Re: If refresh_pattern only extends expiration, how to force time-to-live in Squid code?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



(Resending, first time accidentally sent with HTML formatting, bounced)

Now I see the Expires header having a value in the past, which may
confuse clients and caches further down the chain.
Scenario: origin returns max-age=900 (15 min) and refresh_pattern
overrides expire to 24 hours, what do the headers to the client look
like?

On the first request (cache-miss), the Expires header is not added to
the response sent to client.
On subsequent cache-hits the Expires header is added to the response
sent to client. (Why this artifact?)

The Expires header is set to time the object was received from the
origin plus the value in the Max-age header.
This results in the Expires header having a value in the past when the
cached object is older than the Max-age.

How to fix it best? (in my local version)

Since my trouble is the Expires header having a value in the past, I
consider suppressing the Squid artifact of inserting an Expires
header.
Is there a Squid configuration ability to do so?  If not, what would
be the right way to do it in my local code branch?


On Fri, Aug 28, 2009 at 6:12 PM, Guy Bashkansky <guybas@xxxxxxxxx> wrote:
>
> Henrik,
> Thanks, it works!
> Guy
>
> On Thu, Aug 27, 2009 at 2:00 AM, Henrik Nordstrom <henrik@xxxxxxxxxxxxxxxxxxx> wrote:
>>
>> ons 2009-08-26 klockan 18:17 -0700 skrev Guy Bashkansky:
>>
>> > If indeed refresh_pattern only extends expiration, I would like to
>> > develop a feature that enforces an exact time-to-live (per URL) in my
>> > local branch of Squid code.
>>
>> See the refreshStaleness() function. Should be sufficient to move the
>> max age check up above the expires check.
>>
>> Regards
>> Henrik
>>
>

---------- Forwarded message ----------
From: Guy Bashkansky <guybas@xxxxxxxxx>
Date: Wed, Aug 26, 2009 at 6:17 PM
Subject: If refresh_pattern only extends expiration, how to force
time-to-live in Squid code?
To: squid-dev@xxxxxxxxxxxxxxx


I've tried to set an exact time-to-live (override origin cache
control) in Squid (2.4 STABLE6) configuration by refresh_pattern,
e.g.:

refresh_pattern   30_minutes_cache_control_url   15   0%   15
override-expire   ignore-max-age

Observed: URL is matched (in log), but objects still cached for 30
minutes, rather than for 15 minutes, as hoped.

If indeed refresh_pattern only extends expiration, I would like to
develop a feature that enforces an exact time-to-live (per URL) in my
local branch of Squid code.

What would be the most reasonable way to do this?  How can I force
objects to expire from cache after a given time?

Thanks.


[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux