I highly suggest creating separate templates for static parts of your
page, i.e. headers, footers, etc... Have Smarty cache those
templates, and in your 'more dynamic' templates, disable smarty
caching and cache heavy with Memcached. It would probably be much
faster to use memcached than have Smarty recompile it's caches all
the time on your more dynamic templates - which sounds worthless...
plus, it's a cache to disk...
I would love to be able to do a benchmark on this method; disable
Smarty caching and use memcached, vs pure Smarty caching.
Or one could always use the Memcached plugin for Smarty :) It doesn't
seem to be that popular though.
Brian Brooks
[EMAIL PROTECTED]
Mobile: 303.319.8663
On Sep 10, 2007, at 2:06 AM, Marcus Bointon wrote:
On 10 Sep 2007, at 08:50, Rob Sharp wrote:
Smarty will compile each of these sections individually and then
cache the page as a whole. There's not currently (AFAIK) template-
level caching in Smarty, but one of my co-workers has a working
implementation that we're testing.
That's not true. Smarty caches whole templates, but one template
can be included in another, hence you can get selective caching of
page elements. Read the docs carefully as it's quite fiddly: http://
smarty.php.net/manual/en/caching.php
In particular notice {insert}, and also that plugins can choose
whether their output is cached.
Marcus
--
Marcus Bointon
Synchromedia Limited: Creators of http://www.smartmessages.net/
UK resellers of [EMAIL PROTECTED] CRM solutions
[EMAIL PROTECTED] | http://www.synchromedia.co.uk/