RE: [SMARTY] Re: Caching for portals?
| From: | Alan McFarlane | Date: | Tue, 16 Apr 2002 19:25:34 +0000 |
| Subject: | RE: [SMARTY] Re: Caching for portals? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-3777@lists.php.net to get a copy of this message | ||
This caching seems to be causing problems. I wrote a system which follows
the following rules:
1. The back-end coder only needs to know what variables to supply to the
template and the name of the primary template.
2. The template designer only needs to know what variables have been
supplied.
As the back-end designer, I cache all database results to a file (in my case
stored on a ram-disk), which means that templates, whilst the have compiled,
are not cached. The data is always filled in a run-time.
I havn't done any speed tests on the site, but I've had promising feedback
from the users with regard to speed.
BTW, the system is a 400 terminal intranet with mySQL and Apache/PHP running
on a single NT 300MHz machine.
-----Original Message-----
From: Norbert Röcher [mailto:norbert.roecher@t-online.de]
Sent: 15 April 2002 23:02
To: smarty-general@lists.php.net
Subject: Re: [SMARTY] Re: Caching for portals?
"Michal Prinke" <bogien@conecto.pl> schrieb:
> ...thanks, you are right, but still the PHP-coder has to care for
things
> that should be done by the template designer.
Not for real. The decision to use / not use a cache-function is not a
designers part. It's the definitly the coders part.
> In the ideal case,
> the PHP-coder shouldn't even know how "index.tpl" is split into
subparts
> and which of them are cached - he should only implement the db part,
> the business logic, pass some variables to the template and then,
call
> display() or fetch().
Not for real, again. :-) The coder has to know about subtemplates,
because he does the logic to serve and assign contents to these
templates and to put the filled templates into their parent. It's not
the designers job to care about these things. The designer only has to
care about the order "Do design on a sub-/template for 'foobar'.".
> And that's what it's all about, "separation of
> form and content is a Good Thing [TM]". ;)))
That's still right, anyway. ;-D
Norbert
--
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php