Re: [SMARTY] index.php?id=1 and Caching
| From: | Rasmus Schultz | Date: | Wed, 04 Dec 2002 13:49:55 +0000 |
| Subject: | Re: [SMARTY] index.php?id=1 and Caching | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-6630@lists.php.net to get a copy of this message | ||
I would do this:
$smarty->caching = true;
if (!$smarty->is_cached('shop.tpl', $id)) {
// not yet cached, so do you SQL thing here, stuffing the
// data in smarty variables ($smarty->assign) etc.
}
$smarty->display('shop.tpl', $id);
--- At 2002-12-04, 14:40:00, kompresor <avdija@epn.ba> wrote:
>hi,
>
>all of my pages are created index.php?id=1, id=2 and so on. How can i cache
>them, so i dont overload mysql.
>
>Thanks!
>
>
>
>--
>Smarty General Mailing List (http://smarty.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php