forcing cached queries to renew.

Posted on 2006-11-18
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">


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.
Question by:mcsolas
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
LVL 39

Accepted Solution

gdemaria earned 500 total points
ID: 17973528

 <cfobjectcache action="clear">

 will clear all caches

Author Comment

ID: 17974553
That works nice.

Another nice coldfusion 1 liner : )

Author Comment

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">


Featured Post

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Firewall Speed Issue 6 76
How to switch email hosts (part 2) 11 71
SSL Cert Issues When Testing Microsoft Remote Connection Analyzer 3 67
DNS, website, godaddy 6 95
This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

726 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