Re: [squid-users] Cache-Control: max-age=0 results TCP_MISS

From: Oliver Fänger <oliver.faenger@dont-contact.us>
Date: Wed, 18 Sep 2002 10:15:31 +0200

> > but if try a get with a 'Cache-Control: max-age=0' header,
> > i get a MISS from the cache.
>
> If you set max-age=0 which specifies the max time that an object will be
> considered fresh. you will get MISS .. This is a normal
> situation..Please see this document:
>
> http://www.mnot.net/cache_docs/

this behavior is defined in the HTTP1/1 protokol.
I use the accelerator to keep the load from the webserver,
if everybody can force Squid to reload the pages
(php with many queries to different DBs),
they can slow down or even kill the system.

I thougth that my Squid uses the Squid-2 algorithm (FAQ).

Squid-2 algorithm

For Squid-2 the refresh algorithm has been slightly modified to give the EXPIRES value a higher precedence, and the CONF_MIN value lower precedence:

    if (EXPIRES) {
        if (EXPIRES <= NOW)
            return STALE
        else
            return FRESH
    }
    if (CLIENT_MAX_AGE)
        if (OBJ_AGE > CLIENT_MAX_AGE)
            return STALE
    if (OBJ_AGE > CONF_MAX)
        return STALE
    if (OBJ_DATE > OBJ_LASTMOD) {
        if (LM_FACTOR < CONF_PERCENT)
            return FRESH
        else
            return STALE
    }
    if (OBJ_AGE <= CONF_MIN)
        return FRESH
    return STALE
Received on Wed Sep 18 2002 - 02:15:47 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:10:20 MST