[squid-users] LM-factor and percent (Squid: The Definitive Guide)

From: Stand H <hstandit_at_yahoo.com>
Date: Fri, 3 Jul 2009 08:10:33 -0700 (PDT)

Hi,

I have another question regarding LM-factor.

---- qouted from Squid: The Definitive Guide

Responses that fall between the minimum and maximum are subject to Squid's last-modified factor (LM-factor) algorithm. For such responses, Squid calculates the response age and the LM-factor and compares it to the percent value. The response age is simply the amount of time passed since the origin server generated, or last validated, the response. The resource age is the difference between the Last-Modified and Date headers. The LM-factor is the ratio of the response age to the resource age.

Figure 7-2 demonstrates the LM-factor algorithm. Squid caches an object that is 3 hours old (based on the Date and Last-Modified headers). With an LM-factor value of 50%, the response will be fresh for the next 1.5 hours, after which the object expires and is considered stale. If a user requests the cached object during the fresh period, Squid returns an unvalidated cache hit. For a request that occurs during the stale period, Squid forwards a validation request to the origin server.

------

"LM-factor value of 50%" Did he mean the percent in refresh_pattern or what? What I understand is we should compare LM-factor with the percent which is FRESH if "response age"/"resource age" < percent, else STALE. I don't understand why the response will be fresh for 1.5h. Can someone explain this to me?

Sorry for asking stupid question. Thank you.

ST

      
Received on Fri Jul 03 2009 - 15:10:40 MDT

This archive was generated by hypermail 2.2.0 : Sun Jul 05 2009 - 12:00:02 MDT