Dave Watts sez:

DW====================
If you run a query with the CACHEDWITHIN or CACHEDAFTER attributes, then you
run another query later, it'll use the cached recordset if:

1. The SQL statements used by the two queries are identical. They have to be
EXACTLY identical - no extra spaces, for example.

2. The DATASOURCE, USERNAME, and PASSWORD attribute values are identical.
I'd guess that if you use any other attributes to specify database
connection info, like DBTYPE, PROVIDER, etc. that they'd have to be the same
as well, but I don't know for sure.

The NAME attribute of the query can, in fact, be different, which
contradicts the Allaire courseware.
DW=============

I'm not sure what happens in the case of the same query but different users.

However, from the above it does appear a sure work-around until you find 
out is to insert a different number of spaces in the SQL for each user.

best,  paul


At 09:42 PM 10/15/00 -0400, you wrote:
>When using the following code:
>
><CFQUERY NAME="SEARCH" DATASOURCE="stylee"
>CACHEDWITHIN="#CreateTimeSpan(0,0,10,0)#">
>
>Will that cache for the user, or for the entire server?  I want it to cache
>per user...
>
>My main problem is I have a search that has the results ordered by the
>RAND() function in mysql.  Now in order to page through the query and not
>get the same record more then once, I was caching the query and then paging
>through the cached query.
>
>The code above was working fine, until someone told me it is caching at the
>server level.  I don't want this because as long as someone is search within
>10 minutes, the cache will never be updated with new data, etc.. right?
>It'll be running off of the same old cache over and over.
>
>Am I being stupid again?
>
>Thanks
>
>Jake
>
>------------------------------------------------------------------------------
>Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
>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.

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
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