Re: [SMARTY-DEV] First step to solve {nocache} {/nocache}problematic
| From: | Ivo Jansch | Date: | Thu, 23 Jan 2003 16:05:50 +0000 |
| Subject: | Re: [SMARTY-DEV] First step to solve {nocache} {/nocache}problematic | ||
| References: | 1 2 3 4 5 6 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-606@lists.php.net to get a copy of this message | ||
Hi,
Monte Ohrt wrote:
{$canedit} {myFunc foo=$canedit} {if $canedit ne "false"} ... {/if} The first one is not cached, whereas the second one is not affected by the cache setting, the output of myFunc still gets cached. Same with the if statement.Well, if you want to do it right, those statements should not be cached either. The $canedit is not cachable for a reason, probably that it changes a lot. So if {$canedit} changes, you'd expect {myFunc foo=$canedit} to be changed too (because apparantly its output is dependent on $canedit, which has just changes). This is probably a difficult thing to do. The fact that something can be cached is dependent on its own setting + the settings of all variables it depends on. If any of the 'components' of a tag or statement may not be cached, than the entire statement may not be cached. Compare with an insert statement. It's not cached even if it is called from inside a template that itself is cached. Greetings, Ivo -- Ivo Jansch <ivo@ibuildings.nl> ibuildings.nl BV - information technology http://www.ibuildings.nl