hi John, i did exactly what you have written. In the update action page, after the update query is executed, i put in the query to do a select on the updated table and with cachedwithin="#createtimespan(0,0,0,0)#".
But when i refresh the home page the changes is not shown. I tried to changed the update action page second query cachewithin to 1 second, cachedwithin="#createtimespan(0,0,0,1)#" but it still does not work. the home page still displaying the old info from the cache query. is there something i did wrong ? or some kind of setting i need to do with the CF server ? thanks On Wed, 13 Mar 2002 22:26:25 -0000 John Beynon wrote: >No after your > >> <cfquery name="UpdateMessage" datasource="testingDB"> >> update Welcome >> set message = '#form.welcomemsg#', >> dateedited = #CreateODBCDateTime(Now())# >> </cfquery> > >Do (all in your welcomeupdate.cfm) > >> <cfquery name="getwelcome" cachedwithin="#createtimespan(0,0,0,0)#" >> datasource="testingDB"> >> select * from Welcome >> </cfquery> > >The select expires the cache and then when the next person hits the home >page it will be recached for two days.... > >John. > >> -----Original Message----- >> From: FARRAH NG [mailto:[EMAIL PROTECTED]] >> Sent: 13 March 2002 22:28 >> To: CF-Talk >> Subject: [Re:] RE: cached query >> >> >> In the home page home.index, i have a query like this >> >> <cfquery name="getwelcome" cachedwithin="#createtimespan(0,10,0,0)#" >> datasource="testingDB"> >> select * from Welcome >> </cfquery> >> >> >> In the update admin page welcomeupdate.cfm for this table, i >> have a update query like this: >> >> <cfquery name="UpdateMessage" datasource="testingDB"> >> update Welcome >> set message = '#form.welcomemsg#', >> dateedited = #CreateODBCDateTime(Now())# >> </cfquery> >> >> so what i should do is to put >> cachedwithin="#createtimespan(0,0,0,0)#" >> in the UpdateMessage query in the welcomeupdate.cfm and each >> time the query update the database the cached query >> "getWelcome" in the home.index will be updated instantly, is >> that correct ? >> >> thanks a lot >> >> >> On Wed, 13 Mar 2002 21:31:16 -0000 >> John Beynon wrote: >> >> >Immediately after you've updated the data, use a query with >> >cachedwithin="#createtimespan(0,0,0,0)#" to update the data...then >> it will >> >be recached on the home page using the 2 days or whatever setting >> you want. >> > >> >John. >> > >> >> -----Original Message----- >> >> From: FARRAH NG [mailto:[EMAIL PROTECTED]] >> >> Sent: 13 March 2002 21:34 >> >> To: CF-Talk >> >> Subject: cached query >> >> >> >> >> >> hi all, >> >> i have built a website for a client where the home page is >> >> totally dynamics ( the cfm file has almost 10 queries >> >> accessing 10 different tables in order to populate the page). >> >> Now the client is complaining about the slow load time. >> >> they told me they don't need to have the home page accessing >> >> the database everytime the page is loaded since a lot of the >> >> info in the page is not changed that frequently. I am >> >> thinking of using the CACHEDWITHIN with some of the CFQUERY >> >> in the page, like CACHEDWITHIN 2 days. What i am worrying >> >> about is if the client update the data within those 2 days, >> >> the home page will not >> >> be able to display the lastest info. Is there a way to >> >> refresh all the cached query once the client update the >> >> database, so all the >> >> cached queries will also be updated instantly without waiting >> >> for the CACHEDWITHIN to expire. >> >> >> >> Anyone has any idea is very welcomed to suggest. >> >> >> >> thank >> >> >> >> >> >> >> >> -------------------------------------------------------------- >> >> ------------ >> >> Global Internet phone calls, voicemail, fax, e-mail and >> >> instant messaging. Sign-up today at http://www.hotvoice.com >> >> >> > >> > ______________________________________________________________________ Dedicated Windows 2000 Server PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation � $99/Month � Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

