Have your cake and eat it too..
| From: | Gerard Samuel | Date: | Mon, 25 Nov 2002 16:59:24 +0000 |
| Subject: | Have your cake and eat it too.. | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-6539@lists.php.net to get a copy of this message | ||
Well after getting some pages/blocks into templates, I decided to play with caching.
Its good except in my situation, Im trying to turn caching on/off depending on the sub templates.
I didn't see any real improvements doing it this way. Has anyone else tried working the cache system as such??
Im just trying to have it all.. :)
Another question. I haven't tried, but can $compile_id be set to a certain value at the head of the script execution to mimick global values,
and have display()/fetch() have their own unique values in order for them to work together.
For example ->
<?php
$smarty->compile_id = 'en'; // set en for 'english'
.....
$smarty->display('foo.tpl', 'cache_group', 'another_compile_id');
?>
And can $compile_id accept multiple values at once?
The manual didn't go into details about it.
Thanks for listening....
--
Gerard Samuel
http://www.trini0.org:81/
http://dev.trini0.org:81/