For Programmers: Free Programming Magazines  


Home > Archive > PHP Smarty Templates > March 2004 > caching questions









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author caching questions
Bill Comisky

2004-03-19, 1:28 pm


I'm new to caching and still am a little muddled after reading the
documentation.

- Does it matter if I set
$smarty->caching=true;
or
$smarty->caching=2;

if I am only going to call $smarty->display() once on one template for
this instantiation of $smarty?

- If I have a static header and footer, but dynamic content in the middle,
which of the following is appopriate:


// this:
$smarty->caching = 2;

$smarty->lifetime = -1;
$smarty->display('static_header.tpl');

$smarty->lifetime = 0;
$smarty->display('dynamic.tpl');

$smarty->lifetime = -1;
$smarty->display('static_footer.tpl');


// or this:
$smarty->caching = true;
$smarty->lifetime = -1;

$smarty->display('static_header.tpl');

$smarty->caching = false;
$smarty->display('dynamic.tpl');

$smarty->caching = true;
$smarty->display('static_footer.tpl');

// or maybe have two instantiations, $smarty_caching and
// $smarty_nocaching?

// or some other way?

Thanks for any help,
bill

--
Bill Comisky
bcomisky@pobox.com
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com