Thanks Raymond for the example. I'll incorporate it into my CFC. Well, I've
tried the second method. It didn't work either. I'm using Flash Forms (I
know, it's bit old :)) in the front end. Maybe I should use this in
onRequestStart?

        <cfif structKeyExists(url,"updateapp")>
            <!--- <cfset result = onApplicationEnd() /> --->
            <cfset result = onApplicationStart() />
        </cfif>


2008/11/13 Raymond Camden <[EMAIL PROTECTED]>

>
> <cfset application.x  = y>
>
> There ya go. :) That assumes Y is a query. Here is a more fuller, but
> still a bit pseudo-code, example:
>
> <cfif not structKeyExists(application,"states")>
>
>  <cfquery name="getStates" datasource="foo">
>  select id, name
>  from states
>  </cfquery>
>
>  <cfset application.states = getStates>
> </cfif>
>
> Obviously this could be wrapped up into a CFC.
>
> On Wed, Nov 12, 2008 at 4:43 PM, George Lu <[EMAIL PROTECTED]> wrote:
> > Thank you Raymond. I've tried the first one - it didn't work. I'll try
> the
> > second one.
> >
> > Would you be able to give me an example how to put cache in the
> Application
> > scope?
> >
> > Thanks,
> > George
> >
> > 2008/11/13 Raymond Camden <[EMAIL PROTECTED]>
> >>
> >> You have two methods:
> >>
> >> 1) <cfobjectcache action="clear">
> >>
> >> This clears ALL cached queries on the entire box.
> >>
> >> 2) You can rerun the query with a timespan of 0,0,0,0.
> >>
> >> Note - the SQL must be the exact same, and that includes white space!
> >>
> >> Personally I cache my queries in the Application or Session scope.
> >> Makes it a lot easier to clear.
> >>
> >> On Wed, Nov 12, 2008 at 4:22 PM, George Lu <[EMAIL PROTECTED]> wrote:
> >> > Hi,
> >> >
> >> > I've got a query in a CFC with a cache setting:
> >> > cachedWithin="#CreateTimeSpan(7,0,0,0)#". I've updated the query but
> how
> >> > can
> >> > I clear or reset the cache so I can see the updated query result now?
> >> >
> >> > Thanks,
> >> > George
> >> >
> >> > >
> >> >
> >>
> >>
> >>
> >> --
> >>
> >>
> ===========================================================================
> >> Raymond Camden, VP of Software Dev, Broadchoice
> >>
> >> Email    : [EMAIL PROTECTED]
> >> Blog      : www.coldfusionjedi.com
> >> AOL IM : cfjedimaster
> >>
> >> Keep up to date with the community: http://www.coldfusionbloggers.org
> >>
> >>
> >
> >
> > >
> >
>
>
>
> --
> ===========================================================================
> Raymond Camden, VP of Software Dev, Broadchoice
>
> Email    : [EMAIL PROTECTED]
> Blog      : www.coldfusionjedi.com
> AOL IM : cfjedimaster
>
> Keep up to date with the community: http://www.coldfusionbloggers.org
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to