CF caches dynamic queries, too.  It includes the SQL to distinguish one 
dynamic query from another.

For example, since #REQUEST.alpha# has the value of each of the 26 letters 
in the alphabet, the following query is chached in 26 different Queries, 
even though in my CF code I refer to all as REQUEST.GetHeadingsFirstLetter:

<CFQUERY NAME="REQUEST.GetHeadingsFirstLetter" DATASOURCE="#REQUEST.DSN#" 
USERNAME="#REQUEST.USER#" PASSWORD="#REQUEST.PASS#" 
CACHEDWITHIN="#CreateTimeSpan(0,12,0,0)#">
SELECT Class_ID,Class_Name,Pages
FROM YellowPages (nolock)
WHERE Class_Name LIKE '#REQUEST.alpha#%'
ORDER BY Class_Name
</CFQUERY>

In addition, there is no limit on the number of queries CF will cache.
(The oft-noted limit of 100 is wrong.)

Of course, whether you want to, or should, cache queries in this way 
depends on many factors such as available memory, use a Structure instead, etc.

best,  paul

At 03:08 PM 9/30/00 -0400, you wrote:
>Unfortunately with the large amount of items that the customer has control
>of, they can add and delete items at will. Letting CF cache queries wont
>work since there are no static queries (unless..just had a thought, see
>below).

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to