Updating the cache would be my preference as well.  I've only gone as far
into fourQ as necessary to get my work done, so I have never examined how
the caching mechanism works.  I was actually unaware that there was one
until this problem cropped up.  

I was that there used to be a dedicated website for fourQ, which stimulates
a few questions.

-Is anyone else using fourQ for projects outside of farcry?

-Is there any architectural documentation regarding how it is conceptually
put together?  I was that daemon was in the process of overhauling it,
making it theoretically easier to plug in just about any database, so I am
assuming that work is still being done here, and that a master plan exists?

-Is there anyway of decoupling fourQ from the reliance on the farcry
mapping?


Scott Talsma 
CTO
echo.eleven
404.845.3458

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Geoff Bowers
Sent: Tuesday, January 10, 2006 8:00 PM
To: [email protected]
Subject: [farcry-dev] Re: fourQ issue--cached object being returned after
update


Rather than adding an additional argument to getData() perhaps we need to
add something to setData() that refreshes that cache.  What do people think?

-- geoff
http://www.daemon.com.au/

Scott wrote:

>I have recently used FourQ as a DAO layer for a non-FarCry project.  An 
>odd issue has come up when updating business objects.  I create the 
>structure for the update, issue the myCfc.edit(st), and then do a 
>getData( st.id ).  The getData() always returns a cached copy of the 
>data, pre-update.
>
>I have created a private version of the function allowing me to force a 
>db select (see below), but was wondering if there is something else 
>that I am missing.....
>
>       <cffunction name="getData" access="public" output="false"
>returntype="struct" hint="Get data for a specific objectid and return 
>as a structure, including array properties and typename.">
>               <cfargument name="objectid" type="uuid" required="true">
>               <cfargument name="dsn" type="string" required="false"
>default="#application.dsn#">
>               <cfargument name="dbowner" type="string" required="false"
>default="#ucase(application.dbowner)#">
>               <cfargument name="bShallow" type="boolean" required="false"
>default="false" hint="Setting to true filters all longchar property 
>types from record.">
>               <cfargument name="bFullArrayProps" type="boolean"
required="false"
>default="false" hint="Setting to true returns array properties as an 
>array of structs instead of an array of strings.">
>               <cfargument name="bRefreshCache" type="boolean"
required="false"
>default="false" hint="Setting to true returns array properties as an 
>array of structs instead of an array of strings.">
>               <cfset var stobj=structnew()>
>               <cfset var tablename="">
>               <cfset var aprops="">
>               <cfset var sqlSelect="">
>               <cfset var i=0>
>               <cfset var qgetData="">
>               <cfset var key="">
>               <cfset var qArrayData="">
>               <cfset var aTmp=arraynew(1)>
>               <cfset var stArrayProp=structnew()>
>               <cfset var col=0>
>               <cfset var j=0>
>
>               <cfif isdefined("instance.bgetdata") and instance.bgetdata
eq 
>arguments.objectid AND NOT arguments.bRefreshCache>
>                       <!--- get local instance cache --->
>                       <cfset stObj = instance.stobj>
>                       <cftrace type="information" category="coapi"
var="stobj.typename"
>text="getData() used instance cache.">
>               <cfelse>
>                       <!--- build a local instance cache --->
>                       <cfinclude template="_fourq/getData.cfm">
>                       <cfset instance.stobj = stobj>
>                       <cfset instance.bgetData = arguments.objectid>
>                       <cftrace type="information" category="coapi"
var="stobj.typename"
>text="getData() used database.">
>               </cfif>
>               
>               <cfreturn stObj>
>       </cffunction>
>
>  
>

--
Message protected by MailGuard: e-mail anti-virus, anti-spam and content
filtering.
http://www.mailguard.com.au/mg




Reply via email to