Re: [SMARTY] Caching for portals?
| From: | Brad Atkins | Date: | Sun, 14 Apr 2002 19:01:01 +0000 |
| Subject: | Re: [SMARTY] Caching for portals? | ||
| References: | 1 2 3 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-3710@lists.php.net to get a copy of this message | ||
> The downside of the insert function is it means you have to split your
> template into many small files - something I dislike. A
> {nocache}...{/nocache} function was discussed, but nothing ever came of it
> iirc.
I'd tend to agree with this. Our main reason for switching from
FastTemplates to Smarty was that our template structure could be much
simpler (not to mention the endless list of features Smarty has over FT).
With FT, we had to have some sort of Header, Row, Footer templates for
dynamic sections.
Smarty allows us to have all this inside one template. Now that we have
this, we want to extend our use of Smarty even more, by using caching.
However, if we have to go back to the multiple templates for non-cached
areas, this defeats the purpose and we will be unable to do so.
The use of a nocache section would be very beneficial, in that it allows us
to keep our simple template structure (ie: 1 template instead of many), and
allows us to take full advantage of the caching mechanisms within Smarty.
To be most flexible, I think that both the nocache and insert calls should
be valid. As in some cases, yes, the insert and the use of a seperate
template is necessary (banner ads).
Any comments on this functionality would be greatly appreciated, whether
they are for, or against.
Thanks,
Brad Atkins
Manager, Technical Development
Sales: 1-877-973-2278
Support: 1-877-973-4968
Email: brad@youreshop.com
----- Original Message -----
From: "Peter Bowyer" <reywob@f2s.com>
To: "Linus McCabe" <linus@mccabe.nu>; "Smarty"
<smarty-general@lists.php.net>
Sent: Sunday, April 14, 2002 2:05 PM
Subject: Re: [SMARTY] Caching for portals?
> At 05:05 PM 4/14/02 +0200, Linus McCabe wrote:
> >You can use the insert function to include parts of uncached data in
cached
> >content. You can also turn on and off cache for different display() or
> >fetch() calls.
>
> The downside of the insert function is it means you have to split your
> template into many small files - something I dislike. A
> {nocache}...{/nocache} function was discussed, but nothing ever came of it
> iirc.
>
> While we're on the topic of caching, are the inserts now compiled into PHP
> code, or are they still matched using regular expressions and then the
> files manipulated?
>
> Peter.
>
> --
> Maple Design - quality web design and programming
> http://www.mapledesign.co.uk
>
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>