tracker issue : CF-3923429

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

Queries stay cached even after clearing them in the administrator panel

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Eric Peterson / Eric Peterson (Eric Peterson)

Created: 01/19/2015

Components: Caching

Versions: 11.0

Failure Type:

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Major / All users will encounter

Locale/System: English / Mac 10 All

Vote Count: 6

Listed in the version 2016.0.0.297996 Issues Fixed doc
Verification notes: verified_fixed on July 26, 2017 using build 2016.0.01.298513
Problem Description:

ColdFusion is not clearing the query cache when clearing it through the Administrator panel.

Steps to Reproduce:

Write a query and set `setCachedWithin(CreateTimeSpan(1,0,0,0))`.
Get the results.
Change the underlying data.
Get the results again.
See that your data is not changed (normal caching behavior).
Clear the cache in ColdFusion Administrator -> Caching -> Clear Query Cache Now.
Get the results one more time.
See that the data is still not changed (bug).

Any Workarounds:

Removing the `setCachedWithin()` line stops the bug, but putting the line back in after that reintroduces the bug.

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

Watson Bug ID:	3923429

External Customer Info:
External Company:  
External Customer Name: spardicurus
External Customer Email:  
External Test Config: My Hardware and Environment details:



Mac OS X 10.10.1

ColdFusion 11 Update 3

Oracle 11g Database

Attachments:

  1. December 14, 2015 00:00:00: 1_3923429.zip

Comments:

Have also experience the same situation in a Windows 7 environment.
Vote by External U.
8929 | January 19, 2015 03:41:59 PM GMT
Yes, this happens to me as well - local running Yosemite.
Vote by External U.
8930 | January 19, 2015 05:41:35 PM GMT
+1 - Confirmed that <cfobjectcache action="clear">, Admin API's clearQueryCache() and CF Admin's "Clear Query Cache Now" button no longer work in CF11 Update 3. All of those worked in CF11 Final. Doesn't matter if "Use internal cache to store queries" is enabled or not. Also doesn't matter if cfclasses folder is cleared or not (referring to the recommendation that we do that per the fix for #CF-3741588). Currently, the only workaround in CF11 Update 3 is cacheRemoveAll("query"). Perhaps this is a result of the fix for #CF-3741588?
Vote by External U.
8931 | January 20, 2015 01:43:04 AM GMT
Also confirmed on Win 8.1 and Win 2012. Thanks!, -Aaron
Comment by External U.
8909 | January 20, 2015 01:44:18 AM GMT
Was unable to repro the case. When query cache was cleared from Admin, the data was fetched from database afresh. Please provide more details to repro the issue (simple code snippet and database driver detail) . Thanks.
Comment by Akhila K.
8910 | January 22, 2015 07:49:21 AM GMT
Hi all, Please disregard this part of my vote: 'Doesn't matter if "Use internal cache to store queries" is enabled or not.' Hi Akhila, This issue occurs only when "Use internal cache to store queries" is disabled. It even occurs in CF11 Update 4. Steps to reproduce (using CF's cfartgallery DSN): 1) Disable the "Use internal cache to store queries" in CF Admin 2) Restart CF for that setting to take effect (restart is required - see #CF-3928293) 3) Run this: <cfquery name="q" datasource="cfartgallery" cachedwithin="#createTimeSpan(0,0,1,0)#"> SELECT * FROM art WHERE artID = 1 </cfquery> <cfdump var="#q.artName#"> <cfquery datasource="cfartgallery"> UPDATE art SET artName = 'charles1_temp' WHERE artID = 1 </cfquery> <cfquery name="q" datasource="cfartgallery" cachedwithin="#createTimeSpan(0,0,1,0)#"> SELECT * FROM art WHERE artID = 1 </cfquery> <cfdump var="#q.artName#"> 4) See output is charles1 charles1 (good) 5) Run <cfobjectcache action="clear"> -or- Admin API's clearQueryCache() -or- click the "Clear Query Cache Now" button on CF Admin's "Server Settings > Caching" page 6) Run this: <cfquery name="q" datasource="cfartgallery" cachedwithin="#createTimeSpan(0,0,1,0)#"> SELECT * FROM art WHERE artID = 1 </cfquery> <cfdump var="#q.artName#"> 7) See output is charles1 (bug) 8) Wait 1 minute for the cached query to timeout, or restart CF 9) Repeat #6 10) See output is charles1_temp (good) Note: If "Use internal cache to store queries" is enabled in CF Admin, and CF restarted, then the "Clear Query Cache Now" button works correctly (output is charles1_temp immediately after clicking it). Note: If "Use internal cache to store queries" is disabled in CF Admin, and CF restarted, then the only way to clear the query cache is via cacheRemoveAll("query"). Thanks!, -Aaron
Comment by External U.
8911 | January 27, 2015 04:56:48 AM GMT
I've confirmed Aaron's findings on our app. When "Use internal cache to store queries" is disabled it does not clear the cache. Also, I found that this was not an issue on ColdFusion 11 Update 2. Only Update 3 and on. Thanks, Eric
Comment by External U.
8912 | January 27, 2015 05:42:50 PM GMT
This is a problems for me as well Version 11,0,03,292480 Operating System Windows Server 2012 OS Version 6.2 Adobe Driver Version 5.1.3 (Build 000094)
Vote by External U.
8932 | February 03, 2015 03:04:14 PM GMT
Same issue happening on about 20 servers running Windows server 2008 R2 or 2012 R2.
Vote by External U.
8933 | February 10, 2015 03:59:12 PM GMT
Confirming previous comments on CF11 update 5 on Windows Server 2012. Multiple query impact. <cfset cacheRemoveAll('QUERY')> did not work. confirming cachedwithin="CreateTimeSpan(0, 0, 0, 0)" query ran successfully. But when reset to cachedwithin="CreateTimeSpan(1, 0, 0, 0)" and the original cached results reappeared. Query cache does not clear when 'cleared' in cfadmin
Comment by External U.
8913 | July 08, 2015 11:46:08 AM GMT
CF11 update 5 on Windows Server 2012 Same issue.
Vote by External U.
8934 | July 08, 2015 11:47:31 AM GMT
Adobe!! You marked this Closed/Withdrawn/CannotReproduce?? This is 100% reproducible. Please see my comment on 2:26:48 AM GMT+00:00 Jan 27, 2015. That repro case (which uses cfartgallery DSN) still fails on CF11 Update 5 (build 11,0,05,293506) and on build 11.0.0.295492. Confirmed on Windows 8.1. Adobe.. on a ticket that contains a repro case, and many people confirming it, please engage us before marking a ticket Closed/Withdrawn/CannotReproduce. The following DO NOT clear the Ehcache: 1) <cfobjectcache action="clear"> 2) Admin API's clearQueryCache() 3) the "Clear Query Cache Now" button on CF Admin's "Server Settings > Caching" page Thanks!, -Aaron
Comment by External U.
8914 | September 29, 2015 08:28:50 AM GMT
Same issue also filed as CF-3587061 and CF-3941631. Please re-open. Please fix. 100% repro below. Still fails on CF11 Update 5 (build 11,0,05,293506) and on build 11.0.0.295492. Thanks!, -Aaron
Comment by External U.
8915 | October 07, 2015 01:16:02 AM GMT
Aaron, I was again unable to repro. Tried with CF11 and CF11+Hf5. Shall we setup a connect session to help us understand the repro case? Please let us know. Thanks, Akhila.
Comment by Akhila K.
8916 | October 20, 2015 06:43:46 AM GMT
To clear cache, I have tried with following 3 options : 1. Admin API, code snippet : <cfscript> adminObj = createObject("Component", "cfide.adminapi.administrator"); adminObj.login("adminPassword"); rtService = createObject("component", "cfide.adminapi.runtime"); rtService.clearQueryCache(); writeOutput("Cache cleared using admin API"); </cfscript> 2. ObjectCache tag : <cfobjectcache action="clear"> <cfoutput>Cache cleared using tag cfobjectcache</cfoutput> 3. Admin option: Admin -> Caching -> "Clear query cache now".
Comment by Akhila K.
8917 | October 20, 2015 07:20:15 AM GMT
Hi Akhila, Can I show an engineer at CF Summit? Thanks!, -Aaron
Comment by External U.
8918 | October 31, 2015 03:03:17 AM GMT
Hi Aaron, Sure. Thanks, Akhila.
Comment by Akhila K.
8919 | November 01, 2015 11:43:27 PM GMT
Hi Akhila, I see my comment on "2:26:48 AM GMT+00:00 Jan 27, 2015" still accurately describes/reproduces the issue. Basically, the following no longer clear the "query" Ehcache region in CF11 Update 3+: - <cfobjectcache action="clear"> - Admin API's clearQueryCache() - CF Admin's "Clear Query Cache Now" button Verified on CF11 Update 5 (build 11,0,05,293506) and on build 11,0,0,296013. Important notes: 1) <cfquery> must be used b/c queryExecute() ignores cachedWithin (bug #CF-4087462) 2) CF Admin's "Use internal cache to store queries" setting must be disabled (and ensure CF is restarted after this setting is disabled, per #CF-3928293) Thanks!, -Aaron P.S. Since #CF-3923429 became broken in CF11 Update 3, and since #CF-3741588 became fixed in CF11 Update 3, perhaps both tickets are related. P.S.S. Could you please repro #CF-4087462?
Comment by External U.
8920 | November 15, 2015 06:33:33 AM GMT
Hi Aaron, I used <cfquery> on CF11+hf5 on Win 2012 R2, but could not repro the case. We need to setup connect session to help us repro. Please let us know of when shall we do the same. Thanks, Akhila.
Comment by Akhila K.
8921 | November 20, 2015 02:04:33 AM GMT
Hi Akhila, Thanks for the follow-up. I am ready to do a connect session. I've emailed you. Thanks!, -Aaron
Comment by External U.
8922 | December 04, 2015 05:14:25 AM GMT
Hi Aaron, Today, we can setup a connect session. Please inform the timing. Thanks, Akhila.
Comment by Akhila K.
8923 | December 14, 2015 12:15:34 AM GMT
Hi Akhila, I've attached repro as CF-3923429.zip. It contains bulleted step-by-step list w/ full details. Please let me know if you need more information. Thanks!, -Aaron
Comment by External U.
8924 | December 14, 2015 09:37:44 AM GMT
Aaron, thanks for this. We are able to repro this issue and will be fixed soon. Thanks, Akhila.
Comment by Akhila K.
8925 | December 14, 2015 10:49:43 PM GMT
Hi Akhila, Awesome! :) Thanks very much! This issue began in CF11 Update 3. So this issue might be related to CF-3741588, which became broken in CF10 Update 11 and CF11 and was fixed in CF11 Update 3. Hopefully that helps. When fixing this, could you please ensure these other 3 query caching tickets do not become unfixed: CF-3741588, CF-4043284 and CF-4075117. Thanks!, -Aaron
Comment by External U.
8926 | December 15, 2015 12:47:31 AM GMT
Verified this is fixed in CF2016 Update 1 (build 2016.0.01.298513). This is the ticket I missed most of CF's 20th birthday party for. I was in the hotel room, extremely tired, working on a repro case to show Adobe. :( <3 Thanks!, -Aaron P.S. I love ColdFusion =)
Comment by Aaron N.
8927 | July 26, 2017 04:15:14 AM GMT
Regarding unanswered question: "When fixing this, could you please ensure these other 3 query caching tickets do not become unfixed: CF-3741588, CF-4043284 and CF-4075117." I've confirmed, there are no regressions for these in CF2016 Update 1 (build 2016.0.01.298513): CF-3741588, CF-4043284 (public: CF-4126645) and CF-4075117 (public: CF-4126554). Either Adobe didn't ensure the same, or the comment wasn't made public. Thanks!, -Aaron
Comment by Aaron N.
8928 | July 26, 2017 07:21:07 AM GMT