Re: cache path / compile path / translation

From: Date: Wed, 25 Jul 2001 16:15:30 +0000
Subject: Re: cache path / compile path / translation
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-1285@lists.php.net to get a copy of this message
On Wed, 25 Jul 2001, Hans-Peter Oeri wrote: > Looking through the caching code, I found the somewhat strange encoding of > cache paths: lots of md5 there! Actually, I would suggest using something > like "urlencode" (as in the compile path) just for debugging reasons (at least > one does not only see weird codes...). Furthermore, the encoding is not in a > method, but recreated several times... Any reason for that one? > > Why not write a generic "filename plus some_id" encoding function that could be > used for the creation of the "compiled filename" as well as the "cache > filename"? We use md5 encoding of the filename to break up the namespace a bit when storing cache files. Since there is only one cache directory we subdivide it into 256 theoretically possible subdirectories by using the first 2 characters of md5 encoded filename to figure out which directory it goes into. -Andrei

« previous php.smarty.general (#1285) next »