Solved

forcing cached queries to renew.

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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Two nodes for updates and forwarding 8 51
JVM encoding. How to change encoding. 27 102
Configure a Local PHP Interpreter for Phpstorm 2 254
Configure IIS to process JSON 10 80
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 …
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

778 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