javajcs

Getting keys from JCS Cache


I am using JCS cache for performance enhancement.There is an issue when I need to maintain a set of keys because the type of storage I use is generally offline storage to the disk. Is there a way to get the set of keys alone from the cache as I can with a hashmap,so that I can automate the process of getting the data from the cache,since I dont care about what kind of data comes out of cache because the metadata of the object is stored within the cache object itself.


Solution

  • Resolved it myself,

    In a group cache access,using putInGroup and getFromGroup there is a method getGroupKeys(groupname),which enables us to get the keys alone from the group within the cache region.The API documentation will greatly help in this case.

    http://commons.apache.org/jcs/apidocs/index.html