W3C home > Mailing lists > Public > ietf-http-wg-old@w3.org > January to April 1997

Re: Issues-list item "CACHING-CGI"

From: Andrew Daviel <andrew@andrew.triumf.ca>
Date: Wed, 16 Apr 1997 15:33:38 -0700 (PDT)
To: Jeffrey Mogul <mogul@nospam.org>
Cc: http-wg@cuckoo.hpl.hp.com
Message-Id: <Pine.LNX.3.91.970416150725.21496A-100000@andrew.triumf.ca>
X-Mailing-List: <http-wg@cuckoo.hpl.hp.com> archive/latest/3087
On Wed, 16 Apr 1997, Jeffrey Mogul wrote:

> the practice in the Squid world seems to be different.  I'm
> not sure I fully understand the Squid code, but the version
> I looked at seems to allow caching of a response without
> a Last-Modified header.

Looking at Squid 1.1 (1.0 was slightly different)

Default : cache_stoplist cgi-bin ?
 (don't cache queries or anything with cgi-bin in the path)
Default : refresh_pattern   . 0 20% 4320

Given :

    AGE is how much the object has aged *since* it was retrieved:

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


    LM_FACTOR is the ratio of AGE to LM_AGE:

        LM_FACTOR = AGE / LM_AGE

    CLIENT_MAX_AGE is the (optional) maximum object age the client will
    accept as taken from the HTTP/1.1 Cache-Control request header.

    EXPIRES is the (optional) expiry time from the server reply headers.

  refresh_pattern <URL regular expression> MIN_AGE PERCENT MAX_AGE


        if (AGE > CLIENT_MAX_AGE)
            return STALE
    if (AGE <= MIN_AGE)
        return FRESH
    if (EXPIRES) {
        if (EXPIRES <= NOW)
            return STALE
            return FRESH
    if (AGE > MAX_AGE)
        return STALE
        return FRESH
    return STALE

(from Release-Notes-1.1.txt)

So, if I understand this correctly, with a stock config file:

Objects with a Last-Modified header are cached for 3 days, or when they 
expire, or for 20% of their age when cached, whichever is shortest.

Objects without a Last-Modified header are cached for 3 days, or until 
they expire.

Queries are not cached at all.

One can modify the config, as I have done, to cache queries, perhaps 
pattern-matched to expire sooner than text or images.

Apart from CGI, server-side includes in Apache without XBitHack will
typically not have a Last-Modified date. 

(Incidentally, from a recent survey I did, I see 
  91% with Date
  70% with Content-Length
  64% with Last-Modified
  12% with Etag 
   4% with Expires
   1% with Set-Cookie
   1% with Cache-Control 
though I know we're discussing the future, not the present)

Andrew Daviel
Received on Thursday, 17 April 1997 00:20:08 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:40:19 UTC