Here is a quick shot of what I wanted to do, in its basic form.
<cffunction name="OnApplicationStart">
<!---- Store cfc and recordet at application startup ---->
<cfscript>
application.objCfc = createObject("component",
"#variables.componentsPath#.myCfc");
application.categories = application.objCfc.fnGetCategories();
application.products = application.objCfc.fnGetProducts();
</cfscript>
</cffunction>
I could after that use the request scope to avoid locking.
As long as my application is running, I have the recordsets available in
memory, and i can use QoQ to do all the drill down data manipulation.
In other words, I would only have one database connection , during the
application startup, if I understood correctly.
If I need to refresh the cache, I would just recall the application variable
which store the recordset and overwrite it.
Does that make sens, or I'm loosing it ?
>But isn't the dataset set going to be a "fresh" one without using
>cachedwithin in regards to the query itself? If you say
>
><cfquery name="myName" Datasource="#myDsn#">
>SELECT * FROM products
></cfquery>
>
>Arent you making an unnecessary trip to the database if the dataset is
>already in server memory by using cachedwithin?
>----- Original Message -----
>From: "Robertson-Ravo, Neil (RX)" <[EMAIL PROTECTED]>
>To: "CF-Talk" <[email protected]>
>Sent: Sunday, November 12, 2006 6:14 AM
>Subject: Re: Advice about query caching
>
>
>> It shouldn't have to be calling into the app scope for every request -
>only
>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
>until
>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
>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
>for
>>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:260061
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4