2013-07-14 33 views
-1

如何使另一個在ehcache.xml中聲明的緩存默認爲<defaultCache/>元素。在ehcache中默認創建另一個緩存

<ehcache> 
    <!-- <defaultCache xxxxxx /> --> 
    <cache name="mynewDefault" /> 
</ehcache> 

現在我想使mynewDefault成爲默認緩存。請注意defaultCache已被評論。

回答

0

無論何時將緩存添加到緩存管理器(未放置在配置中),都會使用defaultCache屬性。在你的情況下,這些設置只適用於名爲「mynewDefault」的緩存。只是改變屬性,一切都應該按照你想要的方式工作。