On Tue, Dec 11, 2001 at 01:50:52AM -0800, Ask Bjoern Hansen wrote: > On Thu, 6 Dec 2001, Paul Lindner wrote: > > > > BTW -- I think where the docs are cached should be configurable. I don't > > > like the idea of the document root writable by the web process. > > > > That's the price you pay for this functionality. Because we use > > Apache's native file serving code we need a url->directory mapping > > somewhere. > > uh, why couldn't Apache::CacheContent just set > $r->filename("/where/we/put/the/cache/$file") ?
Simplicity really. This was an example in our upcoming book so I didn't want to add a filename generator to the code, instead we use Apache's url->file mapping mechanism. Also this code was derived from a 404 error handler that I wrote ages ago :) I assume (since you suggested it) that you can set $r->filename to any file in any directory without adding a <Directory> config? I'll have to see how this interacts with the built-in access control logic . > If you add Bill's suggestion about caching on args, headers and > whatnot you would (on some filesystems) need something like that > anyway to make a hashed directory tree. Right. A more elaborate Apache::CacheContent would have a filename hash function, and a separate cache directory structure along the lines of Cache::FileCache. I suppose that one could put the whole uri->cachefile mapping into a custom PerlTransHandler and leave Apache::CacheContent as-is.. -- Paul Lindner [EMAIL PROTECTED] ||||| | | | | | | | | | mod_perl Developer's Cookbook http://www.modperlcookbook.org Human Rights Declaration http://www.unhchr.ch/udhr/index.htm