|
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 |
mstdmstd Smarty Rookie
Joined: 04 Jan 2013 Posts: 20
|
Posted: Tue Jul 29, 2014 12:01 pm Post subject: set smarty in "developers" mode |
|
|
Hi,
How can I set my php project with smarty in "developers" mode so all changes in cache/templates_c directory will be applied at once ? I mean now I have manually to clear cache/templates_c directory to see changes in my templates.
Thanks! |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Tue Jul 29, 2014 2:23 pm Post subject: |
|
|
Disable caching, and be sure compile check is enabled (it is by default) so recompiles always happen.
Smarty 3:
Code: | $smarty->setCaching(Smarty::CACHING_OFF);
$smarty->setCompileCheck(true); |
Smarty 2:
Code: | $smarty->caching = false;
$smarty->compile_check = true; |
|
|
Back to top |
|
mstdmstd Smarty Rookie
Joined: 04 Jan 2013 Posts: 20
|
Posted: Wed Jul 30, 2014 5:22 am Post subject: |
|
|
Thanks, but seems that does not work in my Smarty-3.1.13.
In this case I have to reload page twice(without clearing cache/templates_c directory ) to see my changes in template.
But seems options
Code: | $smarty->force_compile = true;;
$smarty->setCaching(Smarty::CACHING_OFF);
| works! |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Wed Jul 30, 2014 8:34 pm Post subject: |
|
|
The problem could be also a wrong configured PHP opcode cache like APC or other. Do you use any? How is it configured? |
|
Back to top |
|
mstdmstd Smarty Rookie
Joined: 04 Jan 2013 Posts: 20
|
Posted: Thu Jul 31, 2014 3:57 am Post subject: |
|
|
I do not have any cache like APC or other... |
|
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
|