Re: caching problem
| From: | Andrei Zmievski | Date: | Wed, 27 Feb 2002 20:20:22 +0000 |
| Subject: | Re: caching problem | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-2872@lists.php.net to get a copy of this message | ||
Did you declare $REQUEST_URI as global? Use $GLOBALS['REQUEST_URI'] if
you want.
> Hi,
>
> I know this problem was discussed on this list, but I still dont understand
> how the cache is working in smarty.
>
> This code dosent work! Why?
>
> $smarty = new Smarty;
>
> $smarty->caching=true;
> $smarty->compile_check = true;
> $smarty->debugging = false;
>
> $tpl ="index.tpl";
>
>
> if(!$smarty->is_cached($tpl,$REQUEST_URI)){
>
> do some db calls
>
> }
> $smarty->display($tpl,$REQUEST_URI);
>
> ---
> You are currently subscribed to smarty as: andrei@ispi.net
> To unsubscribe send a blank email to $subst('Email.Unsub')
> Visit Smarty's homepage at
> http://www.phpinsider.com/php/code/Smarty/
-Andrei
"PHP is like a teenage blonde walking alone in the night..
and all these newbies are lurking in the shadows.."
-- Jani Taskinen