编程语言
首页 > 编程语言> > java-问题:底层Ehcache使软锁高速缓存条目到期

java-问题:底层Ehcache使软锁高速缓存条目到期

作者:互联网

我收到警告,但不知道该怎么办.每次更新bannedIP时,大约有80000个条目将此警告写入tomcat的catalina.out日志文件:

WARNING: Cache package.BannedIP Key package.BannedIP#73121 Lockable : null
A soft-locked cache entry was expired by the underlying Ehcache. If this happens regularly   you should consider increasing the cache timeouts and/or capacity limits
Dec 16, 2010 10:00:53 PM net.sf.ehcache.hibernate.strategy.AbstractReadWriteEhcacheAccessStrategy handleLockExpiry

ehcache.xml文件中BannedIP的配置:

    <cache name="package.BannedIP"
       maxElementsInMemory="80000"
       eternal="true"
       overflowToDisk="true"
       diskPersistent="true" />

任何帮助将不胜感激.

解决方法:

由于此警告,您是否遇到任何性能或可用性问题?如果不是,那么您似乎应该将警告视为:警告.

否则,解决方案似乎是增加maxElementsInMemory的大小,以解决缓存内容与实际使用内容之间的差异.

希望这可以帮助.

标签:caching,hibernate,ehcache,second-level-cache,java
来源: https://codeday.me/bug/20191023/1914377.html