On 04/02/2012 03:22 AM, Amos Jeffries wrote:
Last-Modified: <date here, should change when the content change>
Cache-Control: public, max-age=60
60 = 60 seconds, means: squid please do not bother the server for 60
seconds after this reply, even if they ask for "If-Modified-Since"
Small correction: means don't ask again until 60 seconds from
Last-Modified. If Last-Modified is missing or invalid, 60 seconds from
Date:.
that's not what I've seen
I returned Last-Modified (very old), Date: "now" and max-age: 60
squid3 is not checking the server again for 1 minute, then when it does
it keep replying without checking the server for another 1 minute and so on.
Is it because I specified Age: 0 and Date now?
I also added Age: 0 (i tell squid that I'm providing a fresh content).
And Date: with the current date, I think this also tells squid the
content is fresh
not sure those are needed but probably helps.
Tells when the response was generated, in case of transfer delays. Acts
as a backup for Last-Modified as above, and a value to synchronise
Expires: comparisons between proxies and servers despite any clock
difference problems.
My server return Age:0 and Date: "now" that should do right?
On the squid size I configured the refresh_pattern <regex> 0 20% 4320
without adding any other option, this was perfectly fine.
refresh_pattern provides default values for max-age / min-age and next
revalidate time if none are provided by the combination of cache control
headers discussed above. When Expires: or Cache-Control: are sent
refresh_pattern value is not used.
In the log it say:
2012/04/02 07:35:47.326| refreshCheck: Matched '/alfresco/service/stream
0 20%% 259200'
are you saying this is ignored?
I tried by setting that rule with 0 %20 0 and I had all TCP_MISS
so apparently the rule "win" against the http headers.
or maybe I misunderstood you :)
thanks again,
Daniele