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

Compiled template are recompiling to often

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


Joined: 25 Jun 2007
Posts: 6

PostPosted: Mon Jun 25, 2007 11:56 am    Post subject: Compiled template are recompiling to often Reply with quote

(I didn't find anything about it in the DOCS or FAQ)
I want to increase the time of the recompiling of templates.
how do you do it?

Thank you!
Back to top
View user's profile Send private message
Celeb
Administrator


Joined: 17 Apr 2007
Posts: 1025
Location: Vienna

PostPosted: Mon Jun 25, 2007 12:40 pm    Post subject: Reply with quote

Templates get compiled when the template timestamp is later than the template_c timestamp or when force_compile is on.

Why do you want to recompile already compiled templates?
_________________
Darn computers always do what I tell them to instead of what I want them to do.
Back to top
View user's profile Send private message
Bnaya
Smarty Rookie


Joined: 25 Jun 2007
Posts: 6

PostPosted: Mon Jun 25, 2007 1:05 pm    Post subject: Reply with quote

I don't want, the problem is that it happened.
Back to top
View user's profile Send private message
Celeb
Administrator


Joined: 17 Apr 2007
Posts: 1025
Location: Vienna

PostPosted: Mon Jun 25, 2007 1:51 pm    Post subject: Reply with quote

Well, as far as I know, smarty only checks the timestamps. Maybe your template files got touched somehow.
_________________
Darn computers always do what I tell them to instead of what I want them to do.
Back to top
View user's profile Send private message
Bnaya
Smarty Rookie


Joined: 25 Jun 2007
Posts: 6

PostPosted: Mon Jun 25, 2007 2:05 pm    Post subject: Reply with quote

where i can see the " template_c timestamp" and how i can change it.
Back to top
View user's profile Send private message
Celeb
Administrator


Joined: 17 Apr 2007
Posts: 1025
Location: Vienna

PostPosted: Mon Jun 25, 2007 2:12 pm    Post subject: Reply with quote

Ehm .. in your filesystem, and I don't think you can change it. The command "touch" updates the modification date of a file to the current time, though.
_________________
Darn computers always do what I tell them to instead of what I want them to do.
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Mon Jun 25, 2007 3:03 pm    Post subject: Reply with quote

If you are the owner of the file you can change the mtime. See the documentation of touch(1) for your system.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Bnaya
Smarty Rookie


Joined: 25 Jun 2007
Posts: 6

PostPosted: Mon Jun 25, 2007 3:21 pm    Post subject: Reply with quote

Where is the code that decide if to recompile the file?
Thank you all!
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Mon Jun 25, 2007 3:27 pm    Post subject: Reply with quote

Code:
$ grep -r -i compile_check ./libs
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Bnaya
Smarty Rookie


Joined: 25 Jun 2007
Posts: 6

PostPosted: Mon Jun 25, 2007 3:50 pm    Post subject: Reply with quote

I mean i want to know in which PHP file the code that decide is to re compile the file is found.
i want to change him that hi will never recompile unless there is no file.
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Mon Jun 25, 2007 5:56 pm    Post subject: Reply with quote

the statement above searches the source code for what you want.

but before you tamper with the source just turn $smarty->compile_check = false. see: http://smarty.php.net/manual/en/variable.compile.check.php
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Bnaya
Smarty Rookie


Joined: 25 Jun 2007
Posts: 6

PostPosted: Mon Jun 25, 2007 6:52 pm    Post subject: Reply with quote

Thank you very much !!, i think now its ok.
I'm not working on Linux, and the windows search don't want to search inside PHP files.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    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