The following works:
<cfquery datasource="#request.dsn.name#"
username="#request.dsn.user#" password="#request.dsn.pwd#"
name="variables.getObjectList"
cachedwithin="#createtimespan(0,2,0,0)#">
while the following two do not:
<cfset variables.timeSpan = createtimespan(0,2,0,0)>
<cfquery datasource="#request.dsn.name#"
username="#request.dsn.user#" password="#request.dsn.pwd#"
name="variables.getObjectList"
cachedwithin="#variables.timeSpan#">
<cfset variables.timeSpan = 2>
<cfquery datasource="#request.dsn.name#"
username="#request.dsn.user#" password="#request.dsn.pwd#"
name="variables.getObjectList"
cachedwithin="#createtimespan(0,variables.timeSpan,0,0)#">
Testing with simple outputs of #createtimespan(0,variables.timespan,0,0)#,
etc. all seem to provide the same result, so why won't it work in the
<cfquery>. I'm basing my assumption that it isn't working by the debug
output that will change from saying "Cached Query" to giving a time in
milliseconds. If this won't work, how else do you dynamically refresh a
cached query whenever you want to?
Thanks,
Dan
The information contained in this message is privileged and confidential. It is
intended solely for the use of the named recipient. If you are not the intended
recipient, you are hereby notified that any disclosure, copying, distribution, or use
of the contents of this transmission is strictly prohibited. If you receive this
message in error, please notify the sender immediately. Thank you.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists