Re: [squid-users] refresh_pattern explanation wanted

2005-05-29 Thread Matus UHLAR - fantomas
> On Thu, 26 May 2005, Matus UHLAR - fantomas wrote:
> 
> >#   usage: refresh_pattern [-i] regex min percent max [options]
> >[...]
> >#   'Percent' is a percentage of the objects age (time since last
> >#   modification age) an object without explicit expiry time
> >#   will be considered fresh.
> >
> >percent of what time? percens of "max" time? or does it mean thar lm-factor
> >thing below? (should be mentioned in the default manual imho)

On 27.05 08:10, Henrik Nordstrom wrote:
> Age of the document. Yes this is the origin of the lm-factor.
> 
> The authoriative manual on Squid directives is squid.conf.default.

the short explanation of lm-factor should be inserted into squid.conf.default
imho.

> >#   Basically a cached object is:
> >#
> >#   FRESH if expires < now, else STALE
> >^
> >shouldn't that be "expires > now"? an object is fresh, if it will expire in
> >the future, not if it already expired, right? (a bug in the doc?)
> 
> Right.

a bug in squid.conf.default, i knew that ;)

> >another strange thing: the lm-factor is explained on
> >http://www.squid-cache.org/Doc/FAQ/FAQ-12.html#ss12.20
> >
> >   # OBJ_DATE is the time when the object was given out by the origin 
> >   server.
> >   This is taken from the HTTP Date reply header.
> >   # OBJ_LASTMOD is the time when the object was last modified, given by 
> >   the
> >   HTTP Last-Modified reply header.
> >
> >   # OBJ_AGE is how much the object has aged since it was retrieved:
> >
> >   OBJ_AGE = NOW - OBJ_DATE
> >
> >- It it really calculated from current local date, and Date: from object
> >header? Does squid mix local Date and remote servers' Date or is this part
> >of configuration incorrect and squid counts current local date and locatl
> >date when the object was fetched?
> 
> Yes there is an mix. And is why it is importand time on the web servers 
> and your proxy is reasonably correct. This is even more visible in the 
> Expires header.

Couldn't this be workarounded by counting time difference by substracting
server-provided Date: from local date and using that difference in some
equations? Or using local date when counting OJB_AGE (and possibly other
values)?

this could solve at least some problems. If the date on server changes
between object is stored there and fetched by us, shit will always happen.
-- 
Matus UHLAR - fantomas, [EMAIL PROTECTED] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Enter any 12-digit prime number to continue.


Re: [squid-users] refresh_pattern explanation wanted

2005-05-26 Thread Henrik Nordstrom

On Thu, 26 May 2005, Matus UHLAR - fantomas wrote:


#   usage: refresh_pattern [-i] regex min percent max [options]
[...]
#   'Percent' is a percentage of the objects age (time since last
#   modification age) an object without explicit expiry time
#   will be considered fresh.

percent of what time? percens of "max" time? or does it mean thar lm-factor
thing below? (should be mentioned in the default manual imho)


Age of the document. Yes this is the origin of the lm-factor.

The authoriative manual on Squid directives is squid.conf.default.


#   Basically a cached object is:
#
#   FRESH if expires < now, else STALE
^
shouldn't that be "expires > now"? an object is fresh, if it will expire in
the future, not if it already expired, right? (a bug in the doc?)


Right.


another strange thing: the lm-factor is explained on
http://www.squid-cache.org/Doc/FAQ/FAQ-12.html#ss12.20

   # OBJ_DATE is the time when the object was given out by the origin server.
   This is taken from the HTTP Date reply header.
   # OBJ_LASTMOD is the time when the object was last modified, given by the
   HTTP Last-Modified reply header.

   # OBJ_AGE is how much the object has aged since it was retrieved:

   OBJ_AGE = NOW - OBJ_DATE

- It it really calculated from current local date, and Date: from object
header? Does squid mix local Date and remote servers' Date or is this part
of configuration incorrect and squid counts current local date and locatl
date when the object was fetched?


Yes there is an mix. And is why it is importand time on the web servers 
and your proxy is reasonably correct. This is even more visible in the 
Expires header.


Regards
Henrik


[squid-users] refresh_pattern explanation wanted

2005-05-26 Thread Matus UHLAR - fantomas
7Hello,

I'm trying to understand refresh_pattern a bit more.

Reading comments config file didn't help much, and the SQUID configuration
manual at visolve.com is 1. buggy (unsecaped '>' and '<' chars makes it
unreadable, reported already) and 2. doesn't contain more informations.

I currently miss the 'percent' number:

#   usage: refresh_pattern [-i] regex min percent max [options]
[...]
#   'Percent' is a percentage of the objects age (time since last
#   modification age) an object without explicit expiry time
#   will be considered fresh.

percent of what time? percens of "max" time? or does it mean thar lm-factor
thing below? (should be mentioned in the default manual imho)

and also:

#   Basically a cached object is:
#   
#   FRESH if expires < now, else STALE
 ^
shouldn't that be "expires > now"? an object is fresh, if it will expire in
the future, not if it already expired, right? (a bug in the doc?)

another strange thing: the lm-factor is explained on
http://www.squid-cache.org/Doc/FAQ/FAQ-12.html#ss12.20


# OBJ_DATE is the time when the object was given out by the origin server.
This is taken from the HTTP Date reply header.
# OBJ_LASTMOD is the time when the object was last modified, given by the
HTTP Last-Modified reply header.

# OBJ_AGE is how much the object has aged since it was retrieved:

OBJ_AGE = NOW - OBJ_DATE

- It it really calculated from current local date, and Date: from object
header? Does squid mix local Date and remote servers' Date or is this part
of configuration incorrect and squid counts current local date and locatl
date when the object was fetched?

# LM_AGE is how old the object was when it was retrieved:

LM_AGE = OBJ_DATE - OBJ_LASTMOD

# LM_FACTOR is the ratio of OBJ_AGE to LM_AGE:

LM_FACTOR = OBJ_AGE / LM_AGE

- the same as above.

-- 
Matus UHLAR - fantomas, [EMAIL PROTECTED] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
If Barbie is so popular, why do you have to buy her friends?