javacachingjcs

Getting all the key and values from JCS Cache


I'm using JCS cache. I want to retrieve all the keys and value from the specific region.

JCS jcsInstance=JCS.getInstance("regionName");

How can I achieve it?


Solution

  • In Group Cache access class there is a method available called getGroupKeys(String groupName).You can pass in the Group name and get all the keys in that group and iterate over it.

    See the documentation for more info.