In your insert CFC, you could do something like this:

<cfset application.clearCache = true>

And in your query caching block, you could do this:

<cfparam name="application.clearCache" default="false">
<cfif not isdefined("application.myCachedQuery") or
application.clearCache>
<cfquery name="foo" ...>
 SELECT
   ...
</cfquery>
<cfset application.myCachedQuery = foo>
<cfset application.clearCache = false>
</cfif>

Something like that, anyway.

Jamie


 On Wed, 30 Jul 2003 09:45:54 -0700 (PDT), in cf-talk you wrote:

>I'm sure there is a way to do this, I just can't seem to think through it.
>Basically, I have a table which isn't going to change much. Instead of
>pulling this information from the database, I'd like to cache the query in
>the Application scope. But when a record IS added to that table, I would
>like to reset the cached version to include the change.
>
>Basically, how can I cache something until I know the records it contains
>changes? If it helps, I'm using CFC's and can easily do this in the INSERT
>function, just can't figure it out. Any help?
>
>Cedric
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to