Quantcast
Channel: Adobe Community : Popular Discussions - ColdFusion
Viewing all articles
Browse latest Browse all 14291

Coldfusion 11 - Clear database cache

$
0
0

Hi

 

We've just upgraded to CF11 update 3 on a 64bit Windows 2008 Server from CF10 and have found that my previous code to clear cached database queries no longer works as instantly or reliably as it did previously.

 

I'm currently using the following code in my application.cfc file.

This code would run if I were to hit the following page on the website... index.cfm?reinit=yes

 

<cffunction name="onRequestStart" hint="">

<cfif structKeyExists(URL, "reinit")>

<cfset cacheRemoveAll()> <!--- Added 7th Jan 2015 without improvement--->

<cfset onApplicationStart()>

<cfobjectcache action="clear">

</cfif>

</cffunction>

 

 

Here's an example of a query I'm trying to clear the cache of

 

<cfquery name="rs_Issue" datasource="#APPLICATION.dsource1#" cachedwithin="#CreateTimeSpan(0,1,0,0)#">

SELECT Issue_ID, Issue_Name

FROM Issue

WHERE Issue_Status = <cfqueryparam cfsqltype="cf_sql_varchar" value="Current">

</cfquery>

 

Has anyone got any suggestions of what I'm doing wrong to clear the database cache (either application or server wide)?

 

Thanks

Stuart


Viewing all articles
Browse latest Browse all 14291

Trending Articles