multilevel-cache-spring-boot-starter icon indicating copy to clipboard operation
multilevel-cache-spring-boot-starter copied to clipboard

spring cache 多级缓存扩展

Results 10 multilevel-cache-spring-boot-starter issues
Sort by recently updated
recently updated
newest added

No CacheResolver specified, and no unique bean of type CacheManager found. Mark one as primary or declare a specific CacheManager to use. at org.springframework.cache.interceptor.CacheAspectSupport.afterSingletonsInstantiated(CacheAspectSupport.java:224) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:914) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551)...

虽然测试中出现的概率几乎为0,但是处理的逻辑确实有可能出现这种情况: 在代码逻辑中: ``` push(new CacheMessage(this.name, key)) caffeineCache.put(key, value) ``` push(new CacheMessage(this.name, key))在CacheMessageListener的回调方法中,并没有过滤掉当前节点,可能会导致当前节点的本地caffeine缓存也删除,当然,这个情况可以说几乎不存在(因为走网络和走内存几乎是走内存快),但是更加严谨的做法,应该是处理消息时,避开当前节点

如题,目前版本只支持 Caffeine,自定义支持 L1 和 L2,预计下周抽空完成。

![image](https://user-images.githubusercontent.com/38214419/231116483-67ac5cde-2d72-49e5-9b2f-46534cbfe1ec.png) push方法是发布订阅的方式通知其他节点删除本地缓存,但是执行put方法的节点是做本地缓存的更新。为啥当前节点本地缓存和其余节点的本地缓存的操作要不一样呢? 主要想问下是出于哪种考虑

按理说 cacheManage使用方式,用hash存储更契合,与caffeine里面的类型也更兼容 过期时间的问题,caffeine中设置的是整个cacheName的过期时间,而redis设置的是每个key的过期时间,是否会有问题呢

有没有使用AOP能监测 org.springframework.cache 包下的操作类,来获取方法执行时计算出来的Key值?谢谢