wchswchs / jobscache

高性能Cache框架(支持关联Cache更新)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

keyCache本地缓存过大导致内存异常

todotobe1 opened this issue · comments

可以考虑CacheInterceptor实现DisposableBean,destroy执行clearMetadataCache

可以可以,我之前也想过,谢泉哥!

可能存在destroy之前就OOM,所以可能还是需要做个大小限制,类似达到两千就clear

我想着定时清理无效的key就行