tracker issue : CF-3308178

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

cacheRemove and exact argument

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/NotABug

Reporter/Name(from Bugbase): Raymond Camden / Raymond Camden (Raymond Camden)

Created: 08/10/2012

Components: Caching

Versions: 10.0

Failure Type:

Found In Build/Fixed In Build: Final / 283076

Priority/Frequency: Normal / Some users will encounter

Locale/System: English / Windows 7 64-bit

Vote Count: 0

According to the docs, cacheRemove's "exact" argument (which I can't figure out how it works) is supposed to default to true. But when I specify it, I get an error. For example:
<cfset cacheKey = "test,or serialized JSON here">
<cfset cachePut(cacheKey,"foo") />
<cfset cacheRemove(cacheKey) />
<cfdump var="#cacheGetAllIds()#">

This runs ok, but suffers from the bug I reported about removing items with a comma in it. But if you do this:

<cfset cacheKey = "test,or serialized JSON here">
<cfset cachePut(cacheKey,"foo") />
<cfset cacheRemove(cacheKey,true) />
<cfdump var="#cacheGetAllIds()#">

You get:

Could not remove some ids from object cache.

IDs not found in cache:TESTOR SERIALIZED JSON HERE.

Notice the missing comma.

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

Watson Bug ID:	3308178

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

Attachments:

Comments:

When "exact" parameter is specified explicitly to "true" for cacheRemove method, the id with comma in it leads to an error. The behaviour is not consistent.
Comment by Akhila K.
18563 | October 08, 2012 01:15:39 AM GMT
Here the second argument in cacheRemove(cacheKey,true) is for "throwOnError" attribute and not "exact" attribute.Since we are setting "throwOnError" to true it is throwing the error in this case which is the expected behaviour.
Comment by Asha K.
18564 | November 28, 2012 06:19:06 AM GMT