Patrick Heiden pisze:

Is there some documentation available about necessary steps to get this 
running? Not able to
imagine how static recources within some blocks are visible to later httpd.

Basic information (from ages pre-SSF) on how to setup httpd in front of Cocoon 
can be found here:
http://wiki.apache.org/cocoon/ApacheModProxy

Some cache related stuff is here:
http://wiki.apache.org/cocoon/ControllingModCache

However, these documents suggest to use direct directory access for serving static resources. My idea is little bit different. In my opinion httpd should never access Cocoon directories directly for serving static files but should always use HTTP requests for that.

The flow should be as follows:
  1. Browser asks (for the first time) httpd for 
/someblock/external/someresource
  2. httpd makes casual HTTP request to Cocoon as it would come from browser. 
Cocoon (SSF)
     dispatches the request to the right block and sitemap in a block takes 
care of serving
     requested resource (external/someresource) and sets up cache-related 
headers (like Expires) in
     returned response.
  3. Response comes to httpd, it detects that response contains cache-related 
headers so it puts
     returned resource into its own cache.
  4. Resources is being served back to browser
  5. Browser asks for the same resource (/someblock/external/someresource) 
again and there are two
     possible situations:
       a) cached response in httpd's cache is still valid (the check is being 
made using saved
          Expires header) so httpd serves it from its own cache and request 
*never reaches* Cocoon
       b) cached response turns out to be invalid (expired) so httpd must ask 
Cocoon to resend the
          resource and we are back in situation from point 2.

I hope that now it's clear what I meant. It would be very nice if some could try out this idea and share her experiences.

WDYT?

--
Grzegorz Kossakowski

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to