0

I found next configuration of ehcache in one poject. For me it looks strange and I do not undestand what for A.blist cache configured. Please help me to understand this configuration.

entity A has list of B type entities

<cache name="A.blist"
       maxElementsInMemory="10000"
       eternal="false"
       overflowToDisk="false"
       memoryStoreEvictionPolicy="LRU" />


<cache name="B"
       maxElementsInMemory="5000"
       eternal="true"
       overflowToDisk="false"
       memoryStoreEvictionPolicy="LRU" />

1 Answer 1

3

Hibernate caches collections in independent caches. So if you have an entity that has a list or set, it will require it's own cache.

This is explained in the hibernate - ehcache integration docs.

Sign up to request clarification or add additional context in comments.

1 Comment

A.blist cache confugures how many collections(instances of list/set etc) may be cached. Conserning current example - this is wrong configuration - there must be more B cached objects then A.blist cached collections

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.