?
Solved

forcing cached queries to renew.

Posted on 2006-11-18
3
Medium Priority
?
138 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 39

Accepted Solution

by:
gdemaria earned 2000 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
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…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

770 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