Re[2]: [SMARTY-DEV] Cache names not persist to current directory change

From: Date: Wed, 02 Jun 2004 13:38:44 +0000
Subject: Re[2]: [SMARTY-DEV] Cache names not persist to current directory change
References: 1 2 3 4 5  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-2374@lists.php.net to get a copy of this message
>> MM>> yes. if you didn't configure template_dir with an absolute path you >> MM>> are effectively using two different template_dirs when changing the >> MM>> pwd. you need a distinct compile_dir for each template_dir you use. >> DK> Great. >> Maybe add something like $smarty->temp_prefix which will be added >> to each compiled filename (and caches) to make them unique? I >> have a lot of directories with templates, and I have to set own >> cache directory for each of them - thousands of subdirectories! MM> you can: MM> - pass a compile_id (unique for each template-dir) to display() It is exactly what I need, thanks! I use something about $smarty->compile_id = preg_replace('{[\\\\/:]}', '_', dirname($fname)); $smarty->fetch($fname); I see that cache names is also depend on compile_id, and it's great. -- Best regards, Dmitry Koteroff.

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