Title:
[Caching Enhancements - Regression] : The "lastupdated" field of cacheGetMetadata() is set to the "lasthit" and "createdtime" field even if the object in the cache is not updated
| View in TrackerStatus/Resolution/Reason: Closed/Withdrawn/AsDesigned
Reporter/Name(from Bugbase): / ext-user (Kavya Maiya)
Created: 03/22/2012
Components: Caching
Versions: 10.0
Failure Type:
Found In Build/Fixed In Build: 282058 /
Priority/Frequency: Normal / Few users will encounter
Locale/System: English / Win XP All
Vote Count: 0
Problem:
[Caching Enhancements - Regression] : The "lastupdated" field of cacheGetMetadata() is set to the "lasthit" and "createdtime" field . This is not correct since the field "lastupdated" should be set only if the object in the cache is updated.
This is happening in the recent build. Was passing on build : 281957
Method:
1. Execute the test cases:
http://10.192.36.59/cfsuite/coldfusion/tags/page-processing/cfcache/caching_enhancements/get/pos/app/cfcache-get-metadata-lastUpdated-app-pos-13.cfm
http://10.192.36.59/cfsuite/coldfusion/tags/page-processing/cfcache/caching_enhancements/get/pos/cfcache-get-metadata-lastUpdated-pos-06.cfm
http://10.192.36.59/cfsuite/coldfusion/tags/page-processing/cfcache/caching_enhancements/get/pos/cfcache-get-metadata-lastUpdated-pos-13.cfm
Sample test case:
<!--- metadata keys to test --->
<cfset key = "lastupdated">
<!--- clear all caches --->
<cfif ArrayLen(cacheGetAllIds()) gt 0>
<cfset cacheRemove(ArrayToList(cacheGetAllIds()))>
</cfif>
<!--- create a unique cache id so that each time a new cache is created --->
<cfset id = createUUID()>
<!--- put something in the cache --->
<cfcache action="Put" id="#id#" value="some_value" timespan="#CreateTimeSpan(0,0,0,30)#" idletime="#CreateTimeSpan(0,0,0,30)#">
<!--- get initial hit count --->
<cfset cacheMetadata = cachegetmetadata(id)>
<cfdump var="#cacheMetadata#">
Here we can see that the "lastupdated" field is not 0. It should be 0 since the object in the cache is not being updated.
Result:
Expected:
Workaround:
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3144420
External Customer Info:
External Company:
External Customer Name:
External Customer Email:
Attachments:
Comments: