Knight
Knight

Reputation: 57

How to fetch all the elements in a MemoryStore of an existing cache [EHCache]

I'm new to EHCache. I have implemented EHCache for my application. I have configured all the cache configuration's. I found that in my cache's MemoryStore there are certain number of elements existing in it. I would like to fetch them all for further manipulation. Could anyone help me out as to how to access elements in MemoryStore of my existing cache.

Thank You in Advance.

Upvotes: 0

Views: 225

Answers (2)

Louis Jacomet
Louis Jacomet

Reputation: 14500

There is no public API to access elements of a specific store in Ehcache. The whole point of the store system is to improve read performance, in a transparent fashion.

Upvotes: 0

Sam
Sam

Reputation: 5731

Here is a snippet to get you started:

cacheKeys = CacheInfo.getCacheKeys();
cacheKeys.forEach((String k) -> {

});

Upvotes: 0

Related Questions