Actually, that's not right.  The cachedwithin attribute of cfquery will do what you 
are saying.

cachedafter caches a query AFTER the date/time you specify, like so:

<cfquery datasource="MyDSN" name="MyQuery" cachedafter="#CreateDateTime(2001,  04,  
16,  21,  35,  0)#">

....SQL...

</cfquery>

Would continue to retrieve the query data from the database until the query was run 
after the date/time specified in the cachedafter attribute.

So to specify a time in the future when the query should be flushed and reloaded from 
the database, use:

<cfquery datasource="MyDSN" name="MyQuery" cachedwithin="#CreateTimeSpan(days, hours, 
minutes, seconds)#">

....SQL...

</cfquery>



- Andy


> -----Original Message-----
> From: Christopher Olive, CIO [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 16, 2001 8:25 PM
> To: CF-Talk
> Subject: RE: Dynamically Displayed Content Weekly?
> 
> 
> you don't even really need to do that.  if you have queries to 
> pull the data
> from your database on the "main page" (the one with the weekly data), use
> the CACHEDAFTER property of CFQUERY.  this will cache the results until a
> certain date.  set the date for one week from today, and voila!
> 
> chris olive, cio
> cresco technologies
> [EMAIL PROTECTED]
> http://www.crescotech.com
> 
> 
> 
> -----Original Message-----
> From: dk [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, April 14, 2001 3:49 AM
> To: CF-Talk
> Subject: Re: Dynamically Displayed Content Weekly?
> 
> 
> Just create a .cfm page to get/ retrieve the content (maybe from 
> a database
> or from some other site).
> 
> Use the cfschedule tag to create a weekly schedule to run the above ..cfm
> file once a week. This will update the content weekly.
> 
> hth,
> 
> DK
> 
> ----- Original Message -----
> From: SHEETS, DAYV (PB) <[EMAIL PROTECTED]>
> To: CF-Talk <[EMAIL PROTECTED]>
> Sent: Saturday, April 14, 2001 1:31 AM
> Subject: Dynamically Displayed Content Weekly?
> 
> 
> > Can anyone tell me where I could find out more regarding dynamically
> > displaying text on a cfm page weekly?
> >
> > I know this can be done in ASP but wasn't sure if it was possible in cf.
> >
> > TIA,
> > Dayv
> >
> >
> 
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to