Re: [SMARTY] looking for most efficient solution

From: Date: Wed, 12 Feb 2003 17:06:51 +0000
Subject: Re: [SMARTY] looking for most efficient solution
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-7690@lists.php.net to get a copy of this message
With caching on, all the output would get cached an not incurr a disk hit for each include, except when cache is (re)generated. On Wed, 2003-02-12 at 11:00, Raquel Pellatz wrote: > Hi all. I have a rather intersting dilemma and couldn't extrapolate an anwer > from the docs or faqs. I have orders of types say.. A and B which have > display formats and variables specific to each. A-orders and B-orders are > often displayed in a mixed collection and on multiple pages. Ideally I would > have templates for display of each order type and could include them in my > other templates approriately. Something like... > > {foreach from=$orders item=order} > {if $order->type == 'A'} > {include file='A.tpl'} > {else if $order->type == 'B'} > {include file='B.tpl'} > {/if} > {foreach} > > My dilemma is... > Would each iteration of the foreach incur a disk hit at the includes? If so, > this would obviousely slow an already taxed system. Would caching help? The > documentation says the *output* of the template is cached, but the values of > the variables A.tpl or B.tpl would display are dynamic and as such their > output would be dynamic as well. > > I'd appreciate any input/suggestions ya'll might have. > Thanks, > Raquel -- Monte Ohrt <monte@ispi.net>

« previous php.smarty.general (#7690) next »