RE:RE caching problem
| From: | atu | Date: | Wed, 27 Feb 2002 20:44:06 +0000 |
| Subject: | RE:RE caching problem | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-2877@lists.php.net to get a copy of this message | ||
If I replace REQUEST_URI by some differnt names, the cache dosent change.
---------------------------------------------------------------------
> Are you getting a new file in the cache directory each time you change
> REQUEST_URI? Is the source file changing each time?
>
> Also, try hard coding and see what happens:
>
> $smarty->display($tpl,'a');
> $smarty->display($tpl,'b');
>
> see if you get two separate caches.
>
> atu wrote:
> >
> > I get the same cache file, even if the content of $REQUEST_URI have changed.
> > -----------------------------------------------------------------
> >
> > > What isn't working exactly? Are you getting the same cache file each
> > > time? Is it not caching at all?
> > >
> > > atu wrote:
> > > >
> > > > Hi,
> > > >
> > > > Yes. I declared $REQUEST_URI as global, but it still dosent work.
> > > >
> > > > -------------------------------------------------------------------
> > > > 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: monte@ispi.net
> > > > To unsubscribe send a blank email to $subst('Email.Unsub')
> > > > Visit Smarty's homepage at
> > > > http://www.phpinsider.com/php/code/Smarty/
> > >
> > > --
> > > Monte Ohrt <monte@ispi.net>
> > > Director of Technology, ispi Inc.
> > >
> > > ---
> > > You are currently subscribed to smarty as: smarty@a-tu.net
> > > To unsubscribe send a blank email to $subst('Email.Unsub')
> > > Visit Smarty's homepage at
> > > http://www.phpinsider.com/php/code/Smarty/
> > >
> > >
> >
> > ---
> > You are currently subscribed to smarty as: monte@ispi.net
> > To unsubscribe send a blank email to $subst('Email.Unsub')
> > Visit Smarty's homepage at
> > http://www.phpinsider.com/php/code/Smarty/
>
> --
> Monte Ohrt <monte@ispi.net>
> Director of Technology, ispi Inc.
>
>