2015-07-21 74 views
0

我的Ehcache配置開始是這樣的:春季4.1.7和羣集ehcache配置可能嗎?

<ehcache maxBytesLocalHeap="200M" updateCheck="false"> 

遇到錯誤,如「maxEntriesLocalHeap不兼容maxBytesLocalHeap上高速緩存管理器設置」後,我看着的彈簧上下文支持來源:

@SuppressWarnings("deprecation") 
    public EhCacheFactoryBean() { 
     setMaxEntriesLocalHeap(10000); 
     setMaxElementsOnDisk(10000000); 
     setTimeToLiveSeconds(120); 
     setTimeToIdleSeconds(120); 
    } 

到setMaxElementsOnDisk該呼叫被評價是這樣的:

void net.sf.ehcache.config.CacheConfiguration.setMaxElementsOnDisk(int maxElementsOnDisk) 



Deprecated. use setMaxEntriesLocalDisk(long) for unclustered caches and setMaxEntriesInCache(long) for clustered caches. 

Sets the maximum number elements on Disk. 0 means unlimited. 

This property can be modified dynamically while the cache is operating. 

Parameters: 
maxElementsOnDisk the maximum number of Elements to allow on the disk. 0 means unlimited. 

這是否意味着春季使用到4.1.7與其依賴ehcache一起2.9.1一個聚簇緩存是不可能的使用彈簧EhCacheFactoryBean?

最好的問候, 卡斯滕

回答

0

很抱歉,但我看不到代碼/文檔片段和你的結論之間的聯繫。你能詳細說明嗎?

有一件事是,它似乎從春季默認緩存創建衝突與你想要在CacheManager級別上做什麼衝突。但是如果你不使用默認緩存,你應該沒有問題。

0

CacheManager和緩存必須使用相同的配置參數maxBytesLocalHeap或maxEntriesLocalHeap,MaxElements *已棄用