jetcache icon indicating copy to clipboard operation
jetcache copied to clipboard

JetCache is a Java cache framework.

Results 222 jetcache issues
Sort by recently updated
recently updated
newest added

本地缓存cache虽然有数量限制,开启刷新后,RefreshCache里的taskMap无数量限制,怎么限制taskMap的数量

背景:我们自己实现了 CacheMonitor 对缓存读写事件进行监听统计。压测时发现有空指针问题。 排查问题: CacheResult 的属性读写都没有做线程安全防护,正常情况下只有缓存读写的主线程会访问这个对象实例。但是有个CacheMonitor接口,CacheEvent的实现类中会透传CacheResult(例如 CacheGetEvent)。此时若CacheMonitor实现类内部另起监听线程,那么就会存在多个线程同时读写CacheResult的场景,引发线程安全问题。

"DubboServerHandler-172.20.6.168:20880-thread-294" Id=543 BLOCKED on com.alicp.jetcache.support.DefaultCacheMonitor@71945b4e owned by "DubboServerHandler-172.20.6.168:20880-thread-179" Id=414 at com.alicp.jetcache.support.DefaultCacheMonitor.afterOperation(DefaultCacheMonitor.java:61) - blocked on com.alicp.jetcache.support.DefaultCacheMonitor@71945b4e - 问题:在并发场景下会出现一定程度的阻塞(blocked) - 方法:com.alicp.jetcache.support.DefaultCacheMonitor#afterOperation - 疑问:想问一下,如果把该方法上的 synchronized 去掉,然后进行优化,是否可以避免阻塞问题 - 改进: 1. 将 synchronized 加在对应的业务方法上 2....

Spring Boot 2 Actuator 支持 caches 的监控 http://localhost:8080/actuator/caches

``` CaffeineCacheBuilder .createCaffeineCacheBuilder() .expireAfterWrite(2 * 60, TimeUnit.SECONDS); ``` 目前只支持expireAfterWrite,请问如何配置refreshAfterWrite?

我是用@Cached创建缓存,此时能看到创建成功,且key为process_Message:123456 @Cached(area = "process", name = "Message:", key = "#messageId", expire = 7, timeUnit = TimeUnit.DAYS, cacheType = CacheType.REMOTE) public Message getMessage(String messageId) { xxxx; } 当我利用@CreateCache删除缓存时(cache.REMOVE()),回调结果返回NOT_EXISTS @CreateCache(area = "process",...

Spring Boot 2.1.4.Release com.alicp.jetcache jetcache-starter-redis-lettuce 2.5.12 在application.yml文件中提示 Unknown property 'jetcache' ![image](https://user-images.githubusercontent.com/8588513/56796294-d14c1580-6844-11e9-8a10-7895abc91def.png)

最近遇到的问题是当返回类型存在泛型的复杂类型的话,由于encode、decode都无法拿到泛型的Type,反序列化会导致异常。 建议作者能否修改下CacheValueHolder,里面新增key属性,然后do_put将key也塞进去,使用一个全局的concurrentHashMap存储下key对应的Type类型。如果使用gson的话,反序列化可以通过先拿到key,然后拿到对应的Type,则可以反序列化成功。

@areyouok 2.6.0支持redis缓存失效后,同步更新本地缓存,redis缓存有更新时,支持同步更新其他服务器上的本地缓存吗?

环境: Spring Boot:2.3.9.RELEASE jetcache:2.6.0 Spring Boot部分配置: ``` jetcache: statIntervalMinutes: 15 areaInCacheName: false local: default: type: caffeine keyConvertor: myKeyConvertor limit: 100 remote: default: type: redis.springdata keyConvertor: bean:myKeyConvertor valueEncoder: java valueDecoder: java...