On 6/2/03 9:42 am, "Stefan Seifert" <[EMAIL PROTECTED]> wrote:

> Hello Miles.
> 
> Thats exactly what we did for implementing a "transparent" file caching system
> with apache 2.0 and cocoon.
> 
> You can use something like this (with mod_rewrite enabled):
> 
> Alias /rsvgn/ "C:/cache/rs/"
> <Directory "C:/cache/rs">
>   RewriteEngine On
>   RewriteCond %{REQUEST_FILENAME} "!-f"
>   RewriteRule (.*) http://localhost:8081/cache/engine/rs/$1 [proxy]
>   AllowOverride None
>   Options Indexes FollowSymLinks MultiViews IncludesNoExec
>   Order allow,deny
>   Allow from all
> </Directory>
> 
> It checks if a given files exists on the local hard disk (or in one of the
> subdirectory, that doesnt matter) and if this fails it redirects (invisible
> for the client becaus of the [proxy] directive) the request to the servlet
> engine.

Talk about _HACKS_ :-) I didnšt know about RewriteCond... You never stop
learning

> In our case the servlet engine processes the request and - in addition to that
> - writes the generated file to the hard disc, so the next time it comes from
> there without even doing a single request to the servlet engine. If the file
> gets invalidated because of a content update another process deletes the file
> from the file system.
> 
> This is a special caching system which replaces the cocoon cache in some way
> for our special purposes. But if the cocoon cache suites you needs, you can do
> the same with cocoon. But in our solution you can switch off the serlvet at
> all, once the cache is populated fully, and the cache is 100% transparent for
> the administrator.

AAAHHHH Ugly! :-) (Hm, but it might just work in few cases)

    Pier


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

Reply via email to