<CF_LONG_WINDED_REPLY> I don't know if this is helpful, but I avoid cached queries at all costs. They can be cumbersome, and you are never certain about when the last time the data was refreshed.
An alternative solution you may wish to consider is storing the data in an application variable instead of a cached query. I am not sure of the differences between cached queries and application variables in terms of consequences for server memory, but application variables are far more manageable and easier to monitor over time. I manage five large CF applications right now, all of which make extensive use of data caching. The criteria I use for deciding whether or not something belongs in the application scope is: 1) Large query, tedious to access 2) Frequency of changes to the data 3) Ubiquity, how often it appears in the application. If any piece of data meets this criteria, it goes in there. To do this, take your query and output it to a structure. Store this in memory. Create a much smaller query that checks to see if the data in the database needs to be refreshed. Run that query via CFEXECUTE at a regular interval, depending on your needs. Use CFLOCK to prevent data corruption. Store a record of each variable refresh in a log file or the database so you always know when the data was last refreshed. Build exception logic into each data refresh page. What this allows me to do is manage data on all five apps centrally, issue commands to refresh data on a schedule I am confortable with (3:00 AM every morning) and always know if there is a problem. I also build data consistency checks into each page, if the numbers fall below a certain threshhold the application disables access to problem data until it can be looked at. </CF_LONG_WINDED_REPLY> M -----Original Message----- From: Jason Miller [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 06, 2003 10:29 PM To: CF-Talk Subject: Really Long Cache Period- advisable? Hello list - I have a question about caching results from a SQL query. Short question : I want to set a query cache for like 7 days. very bad? or not a big deal? Longer Question / Explanation: I used a quick access database to setup content for a site. I output 1 main grouped queries - which is dynamically set by page names on 12 different pages - The code just switches a simple key in the WHERE statement. I planned on using CFCOntent to create static pages BUT to ease development and content - I built in a set of admin functions to add and remove information and quickly reorganize it. Client loved it so much they want to have the ability to use that all the time. Problem is I don't want to maintain different pages. I considered adding a long cache (like 7 days) to limit the amount of times the query is run.......And on the admin page - having a button that can immediately refresh that cache. Adivisable or not? Is it best for me simply to do it the right way and have admin section changes publish everytime through cfcontent?- I am just nervouse because the pages are complex and use alot of flash, javascript and css code. I hope I am clear - Any advice is much needed and greatful Jay ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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 Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

