Re: [SMARTY-DEV] Structure of cache-dir

From: Date: Wed, 26 May 2004 07:42:51 +0000
Subject: Re: [SMARTY-DEV] Structure of cache-dir
References: 1  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-2317@lists.php.net to get a copy of this message
On Mon, May 24, 2004 at 12:01:00AM +0200, Nichlas Löfdahl wrote: > Hello! > > May I suggest changing the directory-handling when it comes to caching? > > Currently I'm having over 19000 directories in the base cache-dir, wouldn't it be > better if they were divided into subdirs with the 3 first letters as prefix (i.e. total of maximum > 4096 subdirs). > > cache/e7d/e7dca61b8e8a9150863bc06d70d1827d that sounds very reasonable to me. i think something like [cache_id]/%%e7/e7d/e7dca61b8%%foo.tpl (with an example crc32 of e7dca61b8 hex) would be good. we would end up with a maximum of 256 directories each containing a maxiumum of 16 subdirectories (the 4096 directories you mentionend) > instead of > > cache/e7dca61b8e8a9150863bc06d70d1827d > > /Nichlas

« previous php.smarty.dev (#2317) next »