|
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 |
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Fri Oct 01, 2010 1:47 pm Post subject: Major change of string resource in SVN |
|
|
Todays update of the SVN does include a major change in the behaviour of string resources.
Up to now string resources have been evaluted which mean they got compiled on each call and the compiled result was not stored for later use.
From now on string resources create a compiled file which is reused when the string did not change. This will improve performance quiet a bit.
The draw back is that Smarty can't detect automatically when a string has changed and will no longer be used. If you have frequent changing string templates it could fill up the compiled template folder.
There is a new eval resource which still provides the old behaviour.
Code: | // eval a string template and do not store compiled code
$smarty->display('eval:'.$string);
// display string template and store compiled code
$smarty->display('string:'.$string);
|
The {eval} tag within templates is still evaluated. You can modify your templates to use
Code: | {include file="string:$foo"} |
to store compiled code as well. |
|
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
|