How long this object should be left in the cache?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How long this object should be left in the cache?

Eliezer Croitoru
I had to tune up couple things and I have a question about a HEAD request I
have seen since something doesn't make sense in them.
I have the following line in the access log:
1499068883.928    163 192.168.168.102 TCP_MISS/200 522 HEAD
http://download.windowsupdate.com/d/msdownload/update/software/updt/2016/03/
windows6.1-kb3147071-x64_18992bd5fa0424684c4872e1c10f5663b6d3aa52.psf -
HIER_DIRECT/8.253.70.46 application/octet-stream Q-CC: "-" "-" Q-P: "-" "-"
REP-CC: "public,max-age=172800" REP-EXP: "Sat, 05 Nov 2016 03:50:11 GMT"
VARY: "-" 52:54:00:bc:e3:78 CacheHeader: "MISS from localhost.localdomain"

And I am using this logformat to get it:
logformat cache_headers %ts.%03tu %6tr %>a %Ss/%03>Hs %<st %rm %ru %[un
%Sh/%<a %mt Q-CC: "%{Cache-Control}>h" "%{Cache-Control}>ha" Q-P:
"%{Pragma}>h" "%{Pragma}>ha" REP-CC: "%{Cache-Control}<h" REP-EXP:
"%{Expires}<h" VARY: "%{Vary}<h" %>eui CacheHeader: "%{X-Cache}<h"
access_log daemon:/var/log/squid/access.log cache_headers

I am not sure if I am seeing right or wrong and if these are real, what is
expected or how it should be treated since:
- the expires header is I the past....
- and against to this it's a public object with a very long maximum age.

How should squid handle this request what is expected from squid in this
confusing situation?

Thanks,
Eliezer

----
Eliezer Croitoru
Linux System Administrator
Mobile: +972-5-28704261
Email: [hidden email]




_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How long this object should be left in the cache?

Amos Jeffries
Administrator
On 03/07/17 20:09, Eliezer Croitoru wrote:

> I had to tune up couple things and I have a question about a HEAD request I
> have seen since something doesn't make sense in them.
> I have the following line in the access log:
> 1499068883.928    163 192.168.168.102 TCP_MISS/200 522 HEAD
> http://download.windowsupdate.com/d/msdownload/update/software/updt/2016/03/
> windows6.1-kb3147071-x64_18992bd5fa0424684c4872e1c10f5663b6d3aa52.psf -
> HIER_DIRECT/8.253.70.46 application/octet-stream Q-CC: "-" "-" Q-P: "-" "-"
> REP-CC: "public,max-age=172800" REP-EXP: "Sat, 05 Nov 2016 03:50:11 GMT"
> VARY: "-" 52:54:00:bc:e3:78 CacheHeader: "MISS from localhost.localdomain"
>
> And I am using this logformat to get it:
> logformat cache_headers %ts.%03tu %6tr %>a %Ss/%03>Hs %<st %rm %ru %[un
> %Sh/%<a %mt Q-CC: "%{Cache-Control}>h" "%{Cache-Control}>ha" Q-P:
> "%{Pragma}>h" "%{Pragma}>ha" REP-CC: "%{Cache-Control}<h" REP-EXP:
> "%{Expires}<h" VARY: "%{Vary}<h" %>eui CacheHeader: "%{X-Cache}<h"
> access_log daemon:/var/log/squid/access.log cache_headers
>
> I am not sure if I am seeing right or wrong and if these are real, what is
> expected or how it should be treated since:
> - the expires header is I the past....
> - and against to this it's a public object with a very long maximum age.
>
> How should squid handle this request what is expected from squid in this
> confusing situation?

It is a HEAD request for something not in cache. What might not be "real"?

IIRC Squid lacks the ability to cache the reply unless there is an
existing object to update the headers for. So it should just relay the
messages instead.

Amos
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How long this object should be left in the cache?

Eliezer Croitoru
Hey Amos,

From what I remember there is an object for HEAD and GET responses.
I am talking only about the HEAD one.
Are you saying that there is no HEAD caching at all? Or that it depends on the GET one?

I am not sure if I understood correctly your response.
Would you be able to clear my doubts?

Thanks,
Eliezer

----
Eliezer Croitoru
Linux System Administrator
Mobile: +972-5-28704261
Email: [hidden email]



-----Original Message-----
From: squid-users [mailto:[hidden email]] On Behalf Of Amos Jeffries
Sent: Monday, July 3, 2017 17:42
To: [hidden email]
Subject: Re: [squid-users] How long this object should be left in the cache?

On 03/07/17 20:09, Eliezer Croitoru wrote:

> I had to tune up couple things and I have a question about a HEAD request I
> have seen since something doesn't make sense in them.
> I have the following line in the access log:
> 1499068883.928    163 192.168.168.102 TCP_MISS/200 522 HEAD
> http://download.windowsupdate.com/d/msdownload/update/software/updt/2016/03/
> windows6.1-kb3147071-x64_18992bd5fa0424684c4872e1c10f5663b6d3aa52.psf -
> HIER_DIRECT/8.253.70.46 application/octet-stream Q-CC: "-" "-" Q-P: "-" "-"
> REP-CC: "public,max-age=172800" REP-EXP: "Sat, 05 Nov 2016 03:50:11 GMT"
> VARY: "-" 52:54:00:bc:e3:78 CacheHeader: "MISS from localhost.localdomain"
>
> And I am using this logformat to get it:
> logformat cache_headers %ts.%03tu %6tr %>a %Ss/%03>Hs %<st %rm %ru %[un
> %Sh/%<a %mt Q-CC: "%{Cache-Control}>h" "%{Cache-Control}>ha" Q-P:
> "%{Pragma}>h" "%{Pragma}>ha" REP-CC: "%{Cache-Control}<h" REP-EXP:
> "%{Expires}<h" VARY: "%{Vary}<h" %>eui CacheHeader: "%{X-Cache}<h"
> access_log daemon:/var/log/squid/access.log cache_headers
>
> I am not sure if I am seeing right or wrong and if these are real, what is
> expected or how it should be treated since:
> - the expires header is I the past....
> - and against to this it's a public object with a very long maximum age.
>
> How should squid handle this request what is expected from squid in this
> confusing situation?

It is a HEAD request for something not in cache. What might not be "real"?

IIRC Squid lacks the ability to cache the reply unless there is an
existing object to update the headers for. So it should just relay the
messages instead.

Amos
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How long this object should be left in the cache?

Amos Jeffries
Administrator
On 04/07/17 02:45, Eliezer Croitoru wrote:
> Hey Amos,
>
>  From what I remember there is an object for HEAD and GET responses.
> I am talking only about the HEAD one.
> Are you saying that there is no HEAD caching at all? Or that it depends on the GET one?
>

I'm not completely sure, but IIRC the HEAD response being expired
already makes it not worth caching. Since in order to reply to even
another HEAD request Squid would have to revalidate / fetch new headers.

Amos
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Loading...