> Is there a way to flush the old cache when a database is
> refreshed, when the refresh process takes place at a different
> time every night? I can automatically detect when the database
> has refreshed itself, so _when_ to purge the old cache is not
> an issue. The issue is how to do it when it has to be done
> at a different time every night. Will shutting down the CF
> Services and restarting them have any effect on the cache
> stored in memory? What about CachedAfter?

If you cycle the CF Application Server service, anything cached in memory by
CF will be discarded. Your other alternative is to add programming logic to
remove items from the cache, or to overwrite them, from within your
application. If you're using memory variables (Session, Application,
Server), you can do this by simply setting flags or something along those
lines. If you're using the CFQUERY cache attributes (CACHEDWITHIN,
CACHEDAFTER) it's not as easy, but you can still get the same effect. At
least, you can if you use CACHEDWITHIN; I haven't tried with CACHEDAFTER.
Simply rerun the cached query, except change the CACHEDWITHIN attribute so
that it looks like this:

CACHEDWITHIN="#CreateTimeSpan(0,0,0,0)#"

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to