|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
pauloricardo Smarty Rookie
Joined: 19 Oct 2009 Posts: 5
|
Posted: Tue Oct 20, 2009 11:43 pm Post subject: Bug? $compile_check |
|
|
Hi,
The docs says:
Quote: | If $caching is enabled and $compile_check is enabled, then the cache files will get regenerated if an involved template file or config file was updated. |
I'm using Smarty 3 Alpha in production and here my cache files get regenerated only if an involved template file was updated. If I change an involved config file it don't get regenerated. Is it a bug?
This is what I'm using:
Code: | $this->_smarty->caching = ($this->getConfig('caching')) ? 2 : 0; // 2
$this->_smarty->cache_lifetime = $this->getConfig('cache_lifetime'); // 3600
$this->_smarty->compile_check = true; |
Thanks in advance,
pauloricardo |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Wed Oct 21, 2009 1:47 pm Post subject: |
|
|
If you load the config file with the {config_load...} tag from your templates it should work.
However if you load them in your script with the $smarty->config_load method this is not detected. (Same behaviour as Smarty2) |
|
Back to top |
|
pauloricardo Smarty Rookie
Joined: 19 Oct 2009 Posts: 5
|
Posted: Wed Oct 21, 2009 1:58 pm Post subject: |
|
|
U.Tews wrote: | If you load the config file with the {config_load...} tag from your templates it should work.
However if you load them in your script with the $smarty->config_load method this is not detected. (Same behaviour as Smarty2) |
Well, I do it within my script and my template. The cache get regenerated only If I change my template a bit. If I change any setting in my config file, the cache regenerates only when expires. |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Wed Oct 21, 2009 3:24 pm Post subject: |
|
|
Indeed there was the file dependency of config files loaded from the template missing. I just updated the SVN. |
|
Back to top |
|
pauloricardo Smarty Rookie
Joined: 19 Oct 2009 Posts: 5
|
Posted: Wed Oct 21, 2009 10:28 pm Post subject: |
|
|
Thank you so much for the fast fix.
Regards,
pauloricardo |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|