On 9/25/05, Patrick Casey <[EMAIL PROTECTED]> wrote:
>
>         Well, you piqued my curiosity and here's what I've found after some
> quality time with the hibernate source code. The short version is that
> you're right; there is a secondary cache, and it does cache objects. It
> does, however, have certain "hidden" restrictions that explain why it worked
> in your example, but not in mine.
>
>         1) Despite what the ehCache documentation says about using default
> cache regions, it will *not* use a default cache region for second level
> cache. If you don't manually create a cache in your ehcache.xml for a given
> persistent class, the default hibernate Persister will get back a null cache
> and treat the entity as uncacheable.

the documentation is quite obscure.
That is what I have in my ehCache.xml
    <defaultCache
        maxElementsInMemory="50000"
        eternal="false"
        timeToIdleSeconds="120"
        timeToLiveSeconds="120"
        overflowToDisk="false"
        diskPersistent="false"
        diskExpiryThreadIntervalSeconds="120"
        />

    <cache name="org.hibernate.cache.StandardQueryCache"
        maxElementsInMemory="10000"
        eternal="false"
        timeToIdleSeconds="120"
        timeToLiveSeconds="120"
        overflowToDisk="false"
        diskPersistent="false"
        diskExpiryThreadIntervalSeconds="120"
        />
    <cache name="org.hibernate.cache.UpdateTimestampsCache"
        maxElementsInMemory="5000"
        eternal="false"
        timeToIdleSeconds="120"
        timeToLiveSeconds="120"
        overflowToDisk="false"
        diskPersistent="false"
        diskExpiryThreadIntervalSeconds="120"
        />

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to