Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

Bug? $compile_check

 
Post new topic   Reply to topic    Smarty Forum Index -> Smarty 3
View previous topic :: View next topic  
Author Message
pauloricardo
Smarty Rookie


Joined: 19 Oct 2009
Posts: 5

PostPosted: Tue Oct 20, 2009 11:43 pm    Post subject: Bug? $compile_check Reply with quote

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
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5067
Location: Hamburg / Germany

PostPosted: Wed Oct 21, 2009 1:47 pm    Post subject: Reply with quote

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
View user's profile Send private message
pauloricardo
Smarty Rookie


Joined: 19 Oct 2009
Posts: 5

PostPosted: Wed Oct 21, 2009 1:58 pm    Post subject: Reply with quote

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. Confused
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5067
Location: Hamburg / Germany

PostPosted: Wed Oct 21, 2009 3:24 pm    Post subject: Reply with quote

Indeed there was the file dependency of config files loaded from the template missing. I just updated the SVN.
Back to top
View user's profile Send private message
pauloricardo
Smarty Rookie


Joined: 19 Oct 2009
Posts: 5

PostPosted: Wed Oct 21, 2009 10:28 pm    Post subject: Reply with quote

Thank you so much for the fast fix. Very Happy

Regards,
pauloricardo
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Smarty 3 All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP