Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

set smarty in "developers" mode

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
mstdmstd
Smarty Rookie


Joined: 04 Jan 2013
Posts: 20

PostPosted: Tue Jul 29, 2014 12:01 pm    Post subject: set smarty in "developers" mode Reply with quote

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


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Tue Jul 29, 2014 2:23 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
mstdmstd
Smarty Rookie


Joined: 04 Jan 2013
Posts: 20

PostPosted: Wed Jul 30, 2014 5:22 am    Post subject: Reply with quote

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


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

PostPosted: Wed Jul 30, 2014 8:34 pm    Post subject: Reply with quote

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


Joined: 04 Jan 2013
Posts: 20

PostPosted: Thu Jul 31, 2014 3:57 am    Post subject: Reply with quote

I do not have any cache like APC or other...
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General 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