> The database is actually MySQL and whilst I could and should 
> cache the 
> circuits query this is only hit once as I call the other 2 
> queries from 
> within the output of the circuits query and hence cannot 
> cache them as 
> their result is dependent on a var which changes each time 
> the loop is 
> executed.


Assume the same var gives the same resulting query and therefore resultset,
you can cache the query based on the var:

<cfloop from="1" to="10" index="I">
        <cfquery name="queryname#i#" datasource="#request.datasource#"
cachedwithin="#createtimespan(0,1,0,0)#">
        SELECT *
        FROM mytable
        WHERE myvar = #i#
        </cfquery>
</cfloop>

That way the query could be cached for one hour and would always provide the
same result

Anyway without looking at your code (and I know it's there) I couldn't see
if this works.  It may help though.

Paul




--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to