tracker issue : CF-4203531

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

CF 2016 - Query Caching Issue - cfstoredprocprocedure

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/PRNeedInfo

Reporter/Name(from Bugbase): Allwyn Duari Raj / ()

Created: 11/26/2018

Components: Database

Versions: 2016

Failure Type: Incorrectly functioning

Found In Build/Fixed In Build: Found in Production / 2020.0.0.318009

Priority/Frequency: Normal / All users will encounter

Locale/System: English / Win 2012 Server x64

Vote Count: 0

Problem Description: We’ve encountered query caching issues in our recently migrated CF 2016 environment. Our legacy system is CF 10, where the same caching procedure is working perfectly fine. See below for more details and advise on your recommendations to resolve this problem.

Steps to Reproduce:
Existing Caching Procedure:
-         We are caching cfstroredproc result set. See below code snippet.
{code:java}
             <cfsetvar cacheVar =createTimeSpan(,,30,)>
             <cfifarguments.clearSPCacheeq"true">
                    <cfset cacheVar =createTimeSpan(,,,-1)>
             </cfif>
 
             <cfstoredprocprocedure="PROC_NAME"datasource="#DSN#"cachedwithin="#cacheVar#">
<cfprocparamvariable="v1"value="#val1#"type="in"cfsqltype="cf_sql_integer">
                    <cfprocresultname="procQuery">
             </cfstoredproc>
{code}

Actual Result:
-         We are using -1 for clearing/expiring the cache. 
-         This is working perfectly fine in CF 10, but we are having problem in clearing the cache in CF 2016, that it just skipping and returning the cached result despite -1.

Expected Result:

Any Workarounds:
I found some similar bug in adobe bug tracker and the fix is available at CF 2016 update 5.
 
https://tracker.adobe.com/#/view/CF-4198816
 
https://tracker.adobe.com/#/view/CF-4198980
 
https://helpx.adobe.com/coldfusion/kb/bugs-fixed-coldfusion-2016-update-5.html#bugsfixed

We have tried to update specific CF instance to Update 5 and still we are seeing the same problem. Based on what we see in the update 5 fix explanations(CF-4198816 & CF-4198817), we assume the fixes were applicable only for cfquery but we are using cfstoredproc.
 
Hence no workaround so far. Right now, as a work around we've cached the query in session object and handling it.

Attachments:

Comments:

Hi Allwyn, Try using the CachedWithin=CreateTimeSpan(0,0,0,0) to purge the cache. Please do let us know if you face any issue with this. -Nimit
Comment by Nimit S.
30161 | January 29, 2019 10:50:41 AM GMT
Hi Allwyn, Is there any update regarding this issue. Yogesh
Comment by Yogesh P.
33199 | February 26, 2020 12:02:53 PM GMT