Re: What can you cache? [was: Byte ranges -- formal spec proposal ]

> What do you mean by "entirely dynamic"?

I meant ones that don't after processing return a static file, but
generate something on the fly and update local files.  Games, visitor
counters, cams, custom responses ("Hello, Ari Luotonen, are you
interested in taking part in our sweepstakes on this sunny Thursday
afternoon?").

I don't know the exact ratios of how many scripts are like that, and
how many don't have side effects, but I do know that the amount of
complaints and bug reports will be intolerable if you start doing
that... :-)

> But if you're querying a big index, you can cache results until you
> rebuild the index, no?

Yep.  For those situations I strongly encourage the use of
Last-modified to be the time the index was built, and the Expires to
be the next time the index will be rebuilt.

> >intended side effects.
> 
> Bzzzt. GET requests are specified to be idempotent. No visible
> side-effects allowed.

*sigh*... We both know this, but we both know that in practice it's
not true.  The Web is full of such CGI programs.

> "Very safe" is still not 100% reliable. It's heuristic. That's why I'd
> like clients to be able to say "It's OK with me if you return
> documents that are up to 12 hours out of date. I'll trade authenticity
> for latency."

Yes, that's the spirit of proxies.  You *can* configure them to always
check, but very soon every one of the users agrees that a few hour
margin between checks just makes the Web so much faster and nicer to
use.  And the percentage option will rule out documents that change
often; say, you have a document that changes daily; with the 10% rule
it will be in the cache at the very most 2.4 hours, and in average 1.2
hours.  Not 12 hours.  You get 12 hours old data only for documents
that have been unchanged for 5 days or more at the time they were last
retrieved or checked.  12 hours at worst here or there then doesn't
matter all that much when you put things into perspective.

Cheers,
--
Ari Luotonen				ari@netscape.com
Netscape Communications Corp.		http://home.netscape.com/people/ari/
501 East Middlefield Road
Mountain View, CA 94043, USA		Netscape Server Development Team

Received on Thursday, 18 May 1995 15:23:03 UTC