Bryan,

Thanks. Appears to do exactly what I need. Thanks :)

Cedric

><cffunction name="getEntries" returntype="query">
>       <cfargument name="updateCache" required="true" default="1">
>
>       <cfif not IsDefined('Application.myEntries') or Arguments.updateCache>
>               <cfquery name="getEntries">
>                       SELECT  *
>                       FROM    EntriesTable
>               </cfquery>
>               <cfset Application.myEntries=getEntries>
>       </cfif>
>
>       <cfreturn Application.myEntries>
></cffunction>
>
>On your update entry page just do
>
>mycfc.getEntries(1|0)
>
>-----Original Message-----
>From: Cedric Villat [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, July 30, 2003 12:46 PM
>To: CF-Talk
>Subject: Caching until updated
>
>
>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

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com

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

Reply via email to