It shouldn't have to be calling into the app scope for every request - only
the first call - onApplicationStart (depending on how fresh you want the
data).

You would then have to control the flushing yourself.









"This e-mail is from Reed Exhibitions (Gateway House, 28 The Quadrant,
Richmond, Surrey, TW9 1DN, United Kingdom), a division of Reed Business,
Registered in England, Number 678540.  It contains information which is
confidential and may also be privileged.  It is for the exclusive use of the
intended recipient(s).  If you are not the intended recipient(s) please note
that any form of distribution, copying or use of this communication or the
information in it is strictly prohibited and may be unlawful.  If you have
received this communication in error please return it to the sender or call
our switchboard on +44 (0) 20 89107910.  The opinions expressed within this
communication are not necessarily those expressed by Reed Exhibitions." 
Visit our website at http://www.reedexpo.com

-----Original Message-----
From: Doug Brown
To: CF-Talk
Sent: Sun Nov 12 13:14:10 2006
Subject: Re: Advice about query caching

Cachedwithin does load the dataset into server memory but stays there until
it times out, and then refreshes. Setting it in the application scope
requires you to query the database for the data to put into that scope and
store it on every request. That is my understanding.



Doug B.


----- Original Message ----- 
From: "Paul Boyd" <[EMAIL PROTECTED]>
To: "CF-Talk" <[email protected]>
Sent: Sunday, November 12, 2006 4:55 AM
Subject: Re: Advice about query caching


> Thanks Doug,
>
> Your feedback is greatly appreciated.
> Could you tell me why storing a recordset in an application variable is
not recommended. I saw this technique used several times, and prefered over
the cachedWithin method. Apparently it's easier to control, to flush the
cache, and I guess you could use Cfqueryparam as well.
> But again, I'm quite confused with the two methods, as both are loaded in
the memory anyway..
> I guess if cachedWithin is here, it's probably for a good reason.
>
> Thanks again Doug :)
>
>
>
>
> >Paul,
> >
> >You should never store database information into a memory variable unless
it
> >is within your shopping cart and then I would store it as a array. If you
> >know for certain that only the prices would be updated weekly, and you
know
> >for certain on which day, I would use cachedwithin with a timeout of say
6
> >days.
> >
> >
> >Hope this helps.
> >
> >
> >Doug B.
> >
> >
> >----- Original Message ----- 
> >From: "Paul Boyd" <[EMAIL PROTECTED]>
> >To: "CF-Talk" <[email protected]>
> >Sent: Sunday, November 12, 2006 4:05 AM
> >Subject: Advice about query caching
> >
> >
> >> Hello everyone,
> >>
> >> First post here, so don't get too hard on me.
> >>
> >> I'm developping a small e-commerce application with less than 1000
> >products ( around 700).
> >> As far as I know, only product prices would be updated on a weekly
basis.
> >>
> >> I'm not too sure how to handle caching.
> >> So here is my question. Is it appropriate to store the products
recordset
> >in an application variable within onApplicationStart, and use QoQ for for
> >data manipulation
> >> in my different templates ? or is it better to use Cachedwithin or
> >CachedAfter options from CFquery ?
> >>
> >> your advice is more than welcome.
> >>
> >>
>
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:260059
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to