Re: Caching question

From: Date: Fri, 21 Dec 2001 14:28:36 +0000
Subject: Re: Caching question
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-2362@lists.php.net to get a copy of this message
I'm getting different cache files when I pass different cache_id's. Are you sure that you are not getting separate caches with the same content somehow? "Brian E. Lozier" wrote: > > Yeah, I made sure. I'm echoing it right before that line, and the value is consistent > with the URL I'm > accessing. However, I'm still getting the same data regardless of which catID I pass in > (only when caching > is on). Any other ideas? > > ----- Original Message ----- > From: Monte Ohrt <monte@ispi.net> > To: smarty@lists.ispi.net > Date: 12/20/01 8:47:28 PM > > > > >make sure that $REQUEST_URI has a value! maybe this first: > > > >global $REQUEST_URI; > > > >"Brian E. Lozier" wrote: > > > >> Thanks for all the help so far. However, it doesn't seem to be working. > >> It's generating a different > cache > >> (I think, because my timer script is different depending on what you pass in the URL > >> "generated this page > in > >> 0.15427 seconds"), but it's caching the exact same content (with the > >> exception of the timer!?). I've got: > >> > >> $tpl->display("main.tpl", $REQUEST_URI); > >> > >> Basically, I'm just pulling a list of files & subcategories from the database > >> based on $catID which is > passed > >> in the URL. > >> > >> files.php?catID=5 > >> > >> Will display all sub categories of '5' as well as all files under category > >> of '5'. The script works > >> perfectly with caching off. When I add the $tpl->display() as listed above, it > >> just lists the categories > as > >> if no argument was passed (files.php w/no catID which defaults to catID=0). > >> > >> What version was that functionality added? I'm in version 1.4.6. If that's > >> not it, any other ideas? > >> > >> Brian > >> > >> ----- Original Message ----- > >> From: Monte Ohrt <monte@ispi.net> > >> To: smarty@lists.ispi.net > >> Date: 12/20/01 3:28:45 PM > >> > >> > > >> >ah, don't pass the cache_id in the URL. Its like this: > >> > > >> >$smarty->display('index.tpl',$REQUEST_URI); > >> > > >> >"Brian E. Lozier" wrote: > >> >> > >> >> For some reason, that's not making sense to me. Since I have nested > >> >> categories, the cache_id keeps > >> getting > >> >> appended over and over, so I end up with URLS that look like: > >> >> > >> >> > >> > > http://www.massassi.org/saberworks/files.php?catID=2&cache_id=/saberworks/files.php?catID=1&cache_id=/saberwo > >> >> rks/files.php > >> >> > >> >> And here's my template: > >> >> > >> >> files.php?catID={$Categories[rows].catID}&cache_id={$smarty.server.REQUEST_URI} > >> >> > >> >> Is there something else I could use as a cache_id? Such as the > >> >> 'catID' which I use to determine the > >> >> category, anyway? Will that mess anything up? > >> >> > >> >> Brian > >> >> ------------------------------------ > >> >> "How should I know if it works? That's what beta testers are for. I > >> >> only coded it." - Linus Torvalds > >> >> > >> >> ----- Original Message ----- > >> >> From: Monte Ohrt <monte@ispi.net> > >> >> To: smarty@lists.ispi.net > >> >> Date: 12/20/01 3:13:28 PM > >> >> > >> >> > > >> >> >It will if you pass $REQUEST_URI as the cache_id. > >> >> > > >> >> >"Brian E. Lozier" wrote: > >> >> >> > >> >> >> Just a quick question... does smarty generate different cache files > >> >> >> based on the arguments passed to > a > >> >> page? > >> >> >> > >> >> >> For instance: > >> >> >> > >> >> >> files.php > >> >> >> files.php?order_by=date > >> >> >> files.php?order_by=date&start=45 > >> >> >> > >> >> >> Will those generate different caches? Or will I get the same > >> >> >> results back no matter what? I guess > you > >> >> can see > >> >> >> what I'm trying to do, just order the files differently, > >> >> >> generate page number listings, etc. > >> >> >> > >> >> >> Thanks, > >> >> >> Brian > >> >> >> > >> >> >> --- > >> >> >> 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> > >> >> >http://www.ispi.net/ > >> >> > > >> >> >--- > >> >> >You are currently subscribed to smarty as: brian@massassi.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> > >> >http://www.ispi.net/ > >> > > >> >--- > >> >You are currently subscribed to smarty as: brian@massassi.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/ > > > > > >--- > >You are currently subscribed to smarty as: brian@massassi.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/à > ¡”ðF¿GÛÑŽ‘ú -- Monte Ohrt <monte@ispi.net> http://www.ispi.net/

« previous php.smarty.general (#2362) next »