Can cachedwithin use a variable?
I'm trying to cache a query on our live web server, but not on our testing server (developers need to see changes realtime, but the public doesn't).
I tried something like this:
<cfif listfirst(servername,".") eq "test"><cfset cachetime = 5><cfelse><cfset cachetime = 0></cfif>
<cfquery name="GetContactInfo" datasource="MyDSN" cachedwithin=#createtimespan(0,0,cache,0)#">
SELECT....
But the results were unexpected (it didn't seem to work).
Is there a way to do this?
