Title:
Bug 81842:(Watson Migration Closure)CacheGetMetadata() Returns both Cache Wide and Item Specific MetadataCurrently, the cacheGetMetadata() function returns metadata that applies both to the individual cache item passed to the function a
| View in TrackerStatus/Resolution/Reason: Closed/Won't Fix/
Reporter/Name(from Bugbase): Rob Bilson / Rob Brooks-Bilson (Rob Bilson)
Created: 01/28/2010
Components: Caching
Versions: 9.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 0000 /
Priority/Frequency: Normal / Unknown
Locale/System: English / Platforms All
Vote Count: 1
Problem:
CacheGetMetadata() Returns both Cache Wide and Item Specific MetadataCurrently, the cacheGetMetadata() function returns metadata that applies both to the individual cache item passed to the function as well as metadata for the entire cache region that the cached item came from. For example, if you have an item in the cache with an ID of “item1” and you can get the metadata for it like this:<cfdump var="#cacheGetMetadata("item1")#">What this actually returns to you is a structure with two sets of information: Cache_hitcount and cache_misscount apply to the overall cache. In other words, how many hits and misses the entire cache have received. The rest of the keys returned in the structure apply to the item passed in to the cacheGetMetadata() function.I see a couple of potential issues with how this has been implemented. What I think we really need is two separate functions here. The existing cacheGetMetadata() should return just the metadata that is specific to the item passed to the function, not metadata on the entire cache. I would expect a separate function to retrieve metadata for the cache itself. To avoid confusion, I’d call the new function something like cacheGetStats(). In my mind it would return the cache_hitcount and cache_misscount that are currently returned by the cacheGetMetadata() function. It would also return a whole lot more that’s available from ehcache but not exposed to ColdFusion – things like the total number of items currently in the cache, total size in bytes of all of the items in the cache, etc.
Method:
Result:
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3040845
External Customer Info:
External Company:
External Customer Name: Rob Brooks-Bilson
External Customer Email: 6B546ECA439559160AAC0C16
External Test Config: 01/28/2010
Attachments:
Comments: