The problem is not limited to clusters - even with a single CF server, if
the data is cached and the DB is changed the cached query contains wrong
data.

In some intranet application I ran into this where the user information was
not being updated even though the admin utility saved it correctly to the
dB.

A solution - in the application writing to the dB after the write is
complete use CFHTTP to hit the dependant application's with a
refreshDB="yes" on the URL.

In all apps reading from the dB use a caching constant like this:
<CFIF isDefined("Attributes.RefreshDB") AND Attributes.RefreshDB>
        <CFSET Request.CachedWithin = createtimespan(0,0,0,1)>
<CFELSE>
        <CFSET Request.CachedWithin = createtimespan(1,0,0,1)>
</CFIF>

That way normally data is cached (for a day) except when there is an update.

Another tip use the timeout on the CFHTTP because all you want is to hit the
server but you don't want the output anyway so for example:
<CFHTTP
url="#Application.IISRoot#/services/ARCAD/index.cfm?RefreshDB=1&labels=1"
timeout="1">

HTH,
Noam


        ----------
        From:  Steve Nelson [SMTP:[EMAIL PROTECTED]]
        Sent:  Thursday, 21 September 2000 13:46
        To:  Fusebox
        Subject:  Re: cf_queryrefresh

        The tag is not worth it.  All it really does is set the timespan in
the cachedwithin attribute to #createtimespan(0,0,0,0)# when you set
attributes.refresh="yes"
        #createtimespan(1,0,0,0)# when you set attributes.refresh="no" I was
being lazy when i wrote that.  At the time i hadn't thought up what happens
when you have clustered servers.

        A much better solution is doing a thing I call the "Synchronization
Server".  This will allow you to keep multiple clustered servers in Sync.
It's still just a theory, but if it
        actually works we'll have a session on it at the next Fusebox
conference, because it is way cool.

        http://www.fusebox.org/theories/sync_server/

        Steve Nelson

        "Andrew Sleigh (Worth Media)" wrote:

        > Does anyone know where I can get hold of the <queryrefresh> tag
that Steve
        > Nelson mentions in his spec on fusebox.org?
        >
        > the URL is
        >
        >
http://www.fusebox.org/specifications/largescale/index.cfm?fuseaction=queryf
        > iles
        >
        > but the link seems to have died....
        >
        > Andy
        >
        >
----------------------------------------------------------------------------
--
        > To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

        
----------------------------------------------------------------------------
--
        To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to