But why would Squid even issue an "If-Modified-Since" to origin server if the min value is set to 5 days? Would this object not be seen as fresh and would just be served up by Squid as a TCP_HIT? ----- Original Message ---- From: Henrik Nordstrom <henrik@xxxxxxxxxxxxxxxxxxx> To: BUI18 <lbui18@xxxxxxxxx> Cc: squid-users@xxxxxxxxxxxxxxx Sent: Wednesday, October 22, 2008 7:19:51 PM Subject: Re: Objects Release from Cache Earlier Than Expected I am talking about If-Modified-Since between Squid and the web server, not browser<->squid. On ons, 2008-10-22 at 17:57 -0700, BUI18 wrote: > Henrik - Thanks for taking time out to respond to my questions. I'm completely stumped on this one. > > In our production environment, we set min and max to 5 and 7 days, respectively. > > As I understand it, if the request is made for the object in say....3 days or 4 days (less than 5 days), I would always expect a TCP_HIT. > > But again, after 1 to 2 days, I see TCP_REFRESH_MISS and I get the whole object. > > I thought that by setting the min to 5 days would guarantee freshness up to 5 days. > > Do you know of a problem that maybe causes Squid to ignore the rules on determining whether an object is fresh? > > We used fiddler and actually removed the "If-Modified-Since" part of the request and still we get TCP_REFRESH_MISS. > > Do you have any other ideas on areas we might want to check to see what could possibly be causing this behavior? > > Thanks > > > > > > ----- Original Message ---- > From: Henrik Nordstrom <henrik@xxxxxxxxxxxxxxxxxxx> > To: BUI18 <lbui18@xxxxxxxxx> > Cc: squid-users@xxxxxxxxxxxxxxx > Sent: Wednesday, October 22, 2008 4:06:33 PM > Subject: Re: Objects Release from Cache Earlier Than Expected > > On ons, 2008-10-22 at 14:35 -0700, BUI18 wrote: > > > Object is initially cached. Max age in squid.conf is set to 1 min. > > Before 1 min passes, I request the object and Squid returns TCP_HIT. > > After 1 min, I try to request for object again. Squid returns > > TCP_REFRESH_HIT, which is what I expect. I leave the entire system > > untouched. A day or a day and a half later, I ask for the object > > again and Squid returns TCP_REFRESH_MISS/200. > > > TCP_HIT is a local hit on the Squid cache. Origin server was not asked. > > TCP_REFRESH_HIT is a cache hit after the origin server was asked if the > object is still fresh. > > TCP_REFREHS_MISS is when the origin server says the object is no longer > fresh and returns a new copy on the conditional query sent by the cache. > (same query as in TCP_REFRESH_HIT, different response from the web > server). > > > What could possibly cause Squid to refetch the entire object again? > > A better question is why your server responds with the entire object on > a "If-Modified-Since" type query if it hasn't been modified. It should > have responded with a 304 response as it did in the TCP_REFRESH_HIT > case. > > Regards > Henrik > > > >