Solved

forcing cached queries to renew.

Posted on 2006-11-18
3
129 Views
Last Modified: 2013-12-24
I have this cfif in my app.cfm file:

<cfif not isDefined("application.init") or isDefined("url.reinit")>

<cfset application.cfc1 = createObject("component","console.cfc.cfc1")>
<cfset application.init       = "true">

</cfif>

So when I call the url: anypage.cfm?reinit=1 .. it re-inits all my cfc's.

I would like to add in this code a way to clear all cached queries, forcing them all to run on the next page execution, grabbing new data.
0
Comment
Question by:mcsolas
  • 2
3 Comments
 
LVL 39

Accepted Solution

by:
gdemaria earned 500 total points
Comment Utility

 <cfobjectcache action="clear">

 will clear all caches
0
 
LVL 1

Author Comment

by:mcsolas
Comment Utility
That works nice.

Another nice coldfusion 1 liner : )
0
 
LVL 1

Author Comment

by:mcsolas
Comment Utility
This is what I ended up with:

<cfif not isDefined("application.init") or isDefined("url.reinit")>

<cfobjectcache action="clear">
<cfset application.cfc1 = createObject("component","console.cfc.cfc1")>
<cfset application.init       = "true">

</cfif>
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
This video discusses moving either the default database or any database to a new volume.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now