[prev in list] [next in list] [prev in thread] [next in thread] 

List:       smarty-dev
Subject:    Re[3]: [SMARTY-DEV] Cache names not persist to current directory change
From:       213.248.61.33
Date:       2004-06-02 12:47:24
Message-ID: 1292029269.20040602164724 () koteroff ! ru
[Download RAW message or body]

>>> If  I  have  2  templates  with  name  a.tpl (/some/dir/a.tpl and
>>> /other/dir/a.tpl) and use code something like this:
>>> 
>>> chdir("/some/dir");
>>> $output = $smarty->fetch("a.tpl");
>>> chdir("/other/dir");
>>> $output = $smarty->fetch("a.tpl");
>>> 
>>> compiled caches for these tempates are in conflict.
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!

-- 
Best regards,
  Dmitry Koteroff.

-- 
Smarty Development Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic