|
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 |
ShenKong Smarty Rookie
Joined: 20 Jan 2004 Posts: 27
|
Posted: Sun Mar 28, 2004 12:45 pm Post subject: How to cache the include file |
|
|
First of all , thanks boots .
Now I am working on a PHP web site . called openphp.cn , the web team now has only one person -- me .
But I am very glad there are many ebullient people here , help me . Thanks ..
Now the question :
In main.tpl .....
Code: | <table>
<tr>
<td>{include file="menu.tpl"}</td>
<td>{include file="body.tpl"}</td>
</tr>
</table> |
How to set the cache_lifetime for menu.tpl ? or any other way to set the lifetime of menu.tpl . _________________ Something comes soon ...
http://www.showtop.net
http://www.openphp.cn |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Mon Mar 29, 2004 6:58 am Post subject: |
|
|
Hi again ShenKong! Thanks for the nice words
As for your problem, as far as I know, Smarty does not allow for multiple cache-lifetimes to be specified. You can pre-compile your indluded scripts using a different cache-lifetime, but that won't help much in general as the next time they are invalidated, they will be recreated with the current ttl settitngs.
Never-the-less, this topic has been discussed and a start of a solution (called clipcache) can be seen in this thread. It has been used with this custom cache-handler which you may also find interesting.
HTH |
|
Back to top |
|
ShenKong Smarty Rookie
Joined: 20 Jan 2004 Posts: 27
|
Posted: Tue Mar 30, 2004 1:20 pm Post subject: |
|
|
It is hard to understand these two topocs ... thanks boots . I think I needn't to include it. but instead to cut the tpl file to some pieces , and display them .
and , smarty has a notice :
line 1185 :
Smarty.class.php
Undefined index: insert_tags _________________ Something comes soon ...
http://www.showtop.net
http://www.openphp.cn |
|
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
|