cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pierpaolo Fumagalli <p...@apache.org>
Subject Re: Cache
Date Mon, 24 Jan 2000 20:30:53 GMT
Hannes Haug wrote:
> 
> Pierpaolo Fumagalli wrote:
> >
> > I bet that for checking cache, proxies issue a HEAD command instead of a
> > GET or POST, if they can do it, and in case of HEAD requests, we need to
> > specify that the document wasn't changed.
> 
> It's a GET with a If-Modified-Since header or something similar.

I thought it was a HEAD. But no problems... If it's the same thing, we
don't have to send the content in both cases...

> > There are three cases:
> >
> > 1) The document need to be generated (generate the whole stuff)
> > 2) The document is cached but not proxied (send content in cache)
> > 3) The document is cached and proxied (just reply that it didn't change)
> 
> Why do we need 2) at all?

Yes. Just consider this case: We have two clients: ClientA and ClientB.
They don't use proxies, or they use different ones, and it's the first
time that they, or theyr proxy servers, hit the
"http://foo.bar/cocoon/generated/doc.xml" page.
This page is simply an XML file with a stylesheet applied to it (so we
can check if the source XML or XSL have changed from the last
generation).
ClientA hits "http://foo.bar/cocoon/generated/doc.xml" at 1200 hours
exactly, Cocoon, for the first time, generates the page, sends it to
ClientA and stores it into its cache.
ClientB hits the same url at 1201 hours, and, since it's the first time
he tries to get that url, he cannot provide a If-Modified-Since header.
If Cocoon has a cache, then he can see  that no changes were made to the
XML and to the XSL since 1200 hours, and serve the cached content,
while, if he doesn't, he HAS to regenerate the page. So, we avoid one
generation step :)

	Pier

-- 
--------------------------------------------------------------------
-          P              I              E              R          -
stable structure erected over water to allow the docking of seacraft
<mailto:pier@betaversion.org>    <http://www.betaversion.org/~pier/>
--------------------------------------------------------------------
- ApacheCON Y2K: Come to the official Apache developers conference -
-------------------- <http://www.apachecon.com> --------------------

Mime
View raw message