I've configured EHCache with a defaultCache (for elements), a StandardQueryCache (for queries) and UpdateTimestampsCache (for what I believe is to keep track of database updates...but I don't really get what it excactly does).
I've set the maxElementsInMemory for each of these caches, but what I don't get is what this number controls for the StandardQueryCache and for the UpdateTimestampsCache. I get that the number of entities that can be cached in the default cache must not exceed 10000, but the query cache does not cache elements. It caches primary keys (as far as I understand).
Does this then mean that the maxElementsInMemory for the StandardQueryCache controls the number of "rows" from results, or does it control the number of primary key pairs for elements it may have?
What about the UpdateTimestampsCache? Does it keep track of the last time an entity was updated, the last time a table was updated...or something else? What number should I use for maxElementsInMemory for this one?
Thanks!
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd" updateCheck="true" monitoring="autodetect" dynamicConfig="true">
<defaultCache
maxElementsInMemory="10000"
eternal="false"
timeToIdleSeconds="3600"
timeToLiveSeconds="3600">
</defaultCache>
<cache
name="org.hibernate.cache.internal.StandardQueryCache"
maxElementsInMemory="10000"
eternal="false"
timeToIdleSeconds="3600"
timeToLiveSeconds="3600">
</cache>
<cache
name="org.hibernate.cache.spi.UpdateTimestampsCache"
maxElementsInMemory="10000"
eternal="true">
</cache>
</ehcache>