Description

Removes the query with the details you provide from query cache.

Returns

Nothing

Syntax

removeCachedQuery(SQL_, datasource, params, region___)

History

ColdFusion 10: Added this function.

Properties

Parameter

Description

SQL

The query SQL.

datasource

The datasource you ran the query on.

params

(Optional) Array of parameter values passed to SQL.

region

(Optional) Specifies the cache region where you can place the cache object

Example

<cfset sql = "SELECT * from art where artid = ?"> 
<cfquery name="q" datasource="cfartgallery" cachedwithin="#CreateTimeSpan(0, 6, 0, 0)#"> 
SELECT * from art where artid = <cfqueryPARAM value = "1" CFSQLType = 'CF_SQL_INTEGER'> 
</cfquery> 
<cfset a = arrayNew(1)> 
<cfset a[1] = 1> 
<cfset removeCachedQuery(sql,"cfartgallery", a)>

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy