Solved

forcing cached queries to renew.

Posted on 2006-11-18
3
132 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
ID: 17973528

 <cfobjectcache action="clear">

 will clear all caches
0
 
LVL 1

Author Comment

by:mcsolas
ID: 17974553
That works nice.

Another nice coldfusion 1 liner : )
0
 
LVL 1

Author Comment

by:mcsolas
ID: 17974556
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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

911 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

20 Experts available now in Live!

Get 1:1 Help Now