On Mon, 02 Aug 2004 08:46:07 -0400, Brian Akins <[EMAIL PROTECTED]> wrote:
> Justin Erenkrantz wrote:
> 
> > -
> > static void mkdir_structure(disk_cache_conf *conf, char *file,
> > apr_pool_t *pool)
> 
> Another big speed-up may be to pre-make all of the directories.  A simple script 
> could use CacheRoot, |CacheDirLength|, and |CacheDirLevels to  create them all.  
> Just require that this script be ran before starting a mod_disk_cache server.  Or if 
> you wanted, you could generate/check the directories in post_config.
> 
> The Squid proxy cache requires you to create all the directories beforehand by 
> running it with a specific switch.  This save a ton of checking for and/or making 
> directories.
> 
> Trust me, it does speed things up a bit....

Wouldn't assuming that the directory is already there be sufficient
(and then create the directory structure on the error path)?  It looks
to me that we only assume the directory structure exists if we had
this very same file cached previously.

Reply via email to