tracker issue : CF-3741588

select a category, or use search below
(searches all categories and all time range)

[ANeff] Bug for: CF10 vs CF11 wrt cacheGetAllIDs() for query objects

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff (Aaron Neff)

Created: 04/11/2014

Components: Caching

Versions: 11.0

Failure Type:

Found In Build/Fixed In Build: PublicBeta /

Priority/Frequency: Major / Some users will encounter

Locale/System: English / Win All

Vote Count: 0

Listed in the version Issues Fixed doc
ColdFusion 10 Update 11 broke cacheGetAllIDs() for query objects. It is still broken in CF11.

For query objects, CF10's (before Update 11) cacheGetAllIDs() returns an array of IDs. In CF10 Update 11+, and CF11, it returns an array of coldfusion.sql.QueryDetails objects.

Steps to Reproduce:

Place these files in site root, and compare result in CF10 (before Update 11) and CF11:

<?xml version="1.0" encoding="UTF-8"?>
<ehcache xmlns:xsi="" xsi:noNamespaceSchemaLocation="ehcache.xsd">
  <diskStore path=""/>
  <cacheManagerEventListenerFactory class="" properties=""/>
  <defaultCache maxElementsInMemory="10000" eternal="false" timeToIdleSeconds="86400" timeToLiveSeconds="86400" overflowToDisk="false" diskSpoolBufferSizeMB="30" maxElementsOnDisk="10000000" diskPersistent="false" diskExpiryThreadIntervalSeconds="3600" memoryStoreEvictionPolicy="LRU" clearOnFlush="true" statistics="true" /> 

component { = "CF10vsCF11wrtCacheGetAllIDs";
  THIS.cache.configfile = expandPath("./ehcache.xml");

  q = queryNew("");
<cfquery name="q" dbtype="query" cachedwithin="#createTimeSpan(0,0,1,0)#">
<cfset writeDump(cacheGetAllIDs("query")) />

Expected result in CF10 and CF11: An array containing an ID.

Actual result in CF10 (before Update 11): An array containing an ID.
Actual result in CF10 (Update 11+) and CF11: An array containing a coldfusion.sql.QueryDetails object.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3741588

External Customer Info:
External Company:  
External Customer Name: itisdesign
External Customer Email:



Related thread:
Comment by External U.
12673 | April 12, 2014 01:07:50 AM GMT
It is not broken and this is how it is supposed to be. If you specify a cacheId, then that will be used as the ID for the cache entry otherwise a QueryDetails object is used as the ID. This object consists of various things like - datasource name, sql, parameters etc.
Comment by Rupesh K.
12674 | April 14, 2014 03:20:02 AM GMT
Hi Rupesh, The QueryDetails object does not work as the ID for all the cache methods - CacheGet, CacheRemove, CacheGetMetadata. That breaks backward compat. Thanks, -Aaron
Comment by External U.
12675 | April 19, 2014 11:40:36 AM GMT
Following caching methods will now work with QueryDetails object- CacheGet, CacheRemove, CacheGetMetadata, CacheIdExists (Comment added from ex-user id:sandeepp)
Comment by Adobe D.
12676 | April 23, 2014 04:38:49 AM GMT
Hi Sandeep, Awesome, thank you very much! -Aaron
Comment by External U.
12677 | April 23, 2014 07:35:07 AM GMT
Hi Rupesh and Sandeep, I've verified this is fixed in CF11 Update 3. The QueryDetails object works with CacheGet, CacheRemove, CacheGetMetadata and CacheIdExists. Thanks!, -Aaron
Comment by External U.
12678 | November 02, 2014 12:35:32 AM GMT
Verified this still works properly in CF2016 Update 1 (build 2016.0.01.298513). Excellent. Thanks!, -Aaron
Comment by Aaron N.
12679 | July 26, 2017 04:38:10 AM GMT