RE: Query Caching Function: Clearing Cached Query

2009-02-11 Thread Adrian Lynch

I don't think you can clear one query, but cfobjectcache will clear them
all.

Best check the docs on that one though because I'm just recalling it.

Adrian

 -Original Message-
 From: Robert Harrison [mailto:rob...@austin-williams.com]
 Sent: 11 February 2009 16:07
 To: cf-talk
 Subject: Query Caching Function: Clearing Cached Query
 
 
 I have a huge query that is used in a timed loop process completes. The
 process could take from a minute to 15 hours, and it runs the query
 each
 time is goes through a loop.
 
 If I cache the query (cached within the last 15 hours), it can save a
 lot of
 re-querying processing... but what if the process completes in a few
 minutes.
 
 Is there a way I can cache the query during the process completes and
 clear
 it when it completes (I know when it's completed)?
 
 
 
 
 Robert B. Harrison
 Director of Interactive services
 Austin  Williams
 125 Kennedy Drive, Suite 100 Hauppauge NY 11788
 T : 631.231.6600 Ext. 119
 F : 631.434.7022
 www.austin-williams.com
 
 Great advertising can't be either/or... It must be .


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319169
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Query Caching Function: Clearing Cached Query

2009-02-11 Thread Robert Harrison

I looked in the docs first. 

What if at the end of the process I ran the query using the same query name
and no caching. Would that actually get rid of the cached query?


Robert B. Harrison
Director of Interactive services
Austin  Williams
125 Kennedy Drive, Suite 100 Hauppauge NY 11788
T : 631.231.6600 Ext. 119 
F : 631.434.7022
www.austin-williams.com

Great advertising can't be either/or... It must be .



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319176
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Query Caching Function: Clearing Cached Query

2009-02-11 Thread Adrian Lynch

No, it needs to have the same SQL.

I wonder if it also needs the same params, doesn't CF8 allow cached queries
with cfqueryparam? Maybe change the param to something that'll return an
empty result.

That's all conjecture mind!

Would cfobjectcache be overkill for the situation?

Adrian

 -Original Message-
 From: Robert Harrison [mailto:rob...@austin-williams.com]
 Sent: 11 February 2009 16:23
 To: cf-talk
 Subject: RE: Query Caching Function: Clearing Cached Query
 
 
 I looked in the docs first.
 
 What if at the end of the process I ran the query using the same query
 name
 and no caching. Would that actually get rid of the cached query?
 
 
 Robert B. Harrison
 Director of Interactive services
 Austin  Williams
 125 Kennedy Drive, Suite 100 Hauppauge NY 11788
 T : 631.231.6600 Ext. 119
 F : 631.434.7022
 www.austin-williams.com
 
 Great advertising can't be either/or... It must be .


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319178
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Query Caching Function: Clearing Cached Query

2009-02-11 Thread Dave Watts

 I wonder if it also needs the same params, doesn't CF8 allow cached queries
 with cfqueryparam? Maybe change the param to something that'll return an
 empty result.

CF 8 does allow cached queries with CFQUERYPARAM. However, it requires
the bound parameter values to match before it uses the cached query.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319188
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Query Caching Function: Clearing Cached Query

2009-02-11 Thread Dave Watts

 What if at the end of the process I ran the query using the same query name
 and no caching. Would that actually get rid of the cached query?

That won't work, but you can flush a single query from the cache by
rerunning the query with only one change - set CACHEDWITHIN to
CreateTimeSpan(0, 0, 0, 0). Everything else about the query must
match, including the SQL.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319189
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Query Caching Function: Clearing Cached Query

2009-02-11 Thread Azadi Saryev

even whitespace inside sql statement must be the same! so mind those
tabs/spaces in your code formatting...

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/



Dave Watts wrote:
 What if at the end of the process I ran the query using the same query name
 and no caching. Would that actually get rid of the cached query?
 

 That won't work, but you can flush a single query from the cache by
 rerunning the query with only one change - set CACHEDWITHIN to
 CreateTimeSpan(0, 0, 0, 0). Everything else about the query must
 match, including the SQL.

 Dave Watts, CTO, Fig Leaf Software
 http://www.figleaf.com/


   

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319209
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4