Thanks Andrew 

I toyed with that idea but I have a bunch of queries being cached on
different pages - for example deleting a record from the company table could
result in a change to results on the company list page as well as various
drop boxes around the place. Each of these queries will often be run from
lines of code in CF but they will be cached separately because the WHERE
clause or the ORDER BY is slightly different.

Another similar idea that I was considering was to create a variables called
application.cacheKey and then output this variable in an SQL comment within
every query on that I was caching. By changing the cacheKey I should then
(in theory) be able to flush the cache on application by application basis.
It's a bit kludgy but I can't see why it wouldn't work.

All of this is based on my understanding of "To use cached data, the current
query must use the same *SQL statement*..." bit in the docs.

So my thinking is that:

<cfquery cachedWithin="#createTimeSpan(0,0,10,0)#">
SELECT * 
FROM users
/* 123 */
</cfquery>

won't use the same cached data as:

<cfquery cachedWithin="#createTimeSpan(0,0,10,0)#">
SELECT * 
FROM users
/* 987 */
</cfquery>

because the comment in the SQL statement is different. Am I confusing myself
here or does this make sense?


Cheers

Mark


------------------
Mark Stanton 
Technical Director 
Gruden Pty Ltd 
Tel: +61 2 9299 9462 
Fax: +61 2 9299 9463 
Mob: +61 410 458 201 
http://www.gruden.com  


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004

Reply via email to