Files
hibernate-demo/src/test/resources/ehcache-chapter18.xml
T

38 lines
1.2 KiB
XML

<config xmlns="http://www.ehcache.org/v3">
<!--
Chapter 18's own ehcache.xml, loaded only by the tests in
com.ankurm.hibernatedemo.cache, each booting an isolated SessionFactory
(see NaturalIdL2CacheTest's pattern in chapter 06) so this never touches
the shared Spring context's pinned use_second_level_cache: false.
-->
<cache alias="productCache">
<expiry>
<ttl unit="minutes">30</ttl>
</expiry>
<resources>
<heap unit="entries">1000</heap>
<offheap unit="MB">10</offheap>
</resources>
</cache>
<!-- Required for hibernate.cache.use_query_cache=true. Omitting this region produces the
real startup failure captured in docs/output/18-missing-timestamps-region.txt. -->
<cache alias="default-update-timestamps-region">
<expiry>
<none/>
</expiry>
<resources>
<heap unit="entries">5000</heap>
</resources>
</cache>
<cache alias="default-query-results-region">
<expiry>
<ttl unit="minutes">10</ttl>
</expiry>
<resources>
<heap unit="entries">200</heap>
</resources>
</cache>
</config>