> 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...

That will cache that recordset for the server. It will be reused by any
other query that executes before the cached query expires, that also uses
the same database connection and SQL statement.

> 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.

That's right; that's the point of using the CACHEDWITHIN or CACHEDAFTER
attributes. If you want to create a variable that is specific to a user, put
your query in the Session scope instead of using the caching attributes of
the CFQUERY tag.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
------------------------------------------------------------------------------
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