0

I have configured ehcache for hibernate 2nd level cache to use a Terracotta server. Everything is working fine, except the UpdateTimestampsCache for the query cache is just not showing up in the Dev Console. We are using Hibernate 3.6.10 and ehcache 2.6.0.

I am seeing all entity, collection, query and the StandardQueryCache, but not org.hibernate.cache.UpdateTimestampsCache. I know the timestamp cache exists and is being used because I can see the stats on it using the the metrics lib instrumented in.

Any ideas? Thanks!

Here's my ehcache.xml config

<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd"
    updateCheck="false" 
    name="Hibernate-CacheManager"
    monitoring="autodetect"
    dynamicConfig="true">    

<terracottaConfig url="localhost:9510" />

<defaultCache
    eternal="false"
    overflowToDisk="false"
    maxElementsInMemory="50000"
    timeToIdleSeconds="7200"
    timeToLiveSeconds="0">

    <cacheDecoratorFactory 
        class="com.yammer.metrics.ehcache.InstrumentedEhcacheFactory" />

    <terracotta/>
</defaultCache>


<cache
    name="org.hibernate.cache.UpdateTimestampsCache"
    eternal="false"
    overflowToDisk="false"
    maxElementsInMemory="500"
    timeToIdleSeconds="7200"
    timeToLiveSeconds="0">

    <cacheDecoratorFactory 
        class="com.yammer.metrics.ehcache.InstrumentedEhcacheFactory" />

    <terracotta/>

</cache>

<cache
    name="org.hibernate.cache.StandardQueryCache"
    eternal="false"
    overflowToDisk="false"
    maxElementsInMemory="50000"
    timeToIdleSeconds="7200"
    timeToLiveSeconds="0">

    <cacheDecoratorFactory 
        class="com.yammer.metrics.ehcache.InstrumentedEhcacheFactory" />

    <terracotta/>

</cache>
</ehcache>
Marc
  • 3,243
  • 3
  • 23
  • 26

1 Answers1

0

Recopying answer from: http://forums.terracotta.org/forums/posts/list/0/7554.page#36815

Hibernate does not maintain statistics for the UpdateTimestampsCache cache up to Hibernate 4.0.0. This explains why the cache does not show up in the terracotta dev console.

This is filed as bug https://hibernate.onjira.com/browse/HHH-5326

Marc
  • 3,243
  • 3
  • 23
  • 26