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

如下面这段代码,就有两个问题: ` lock.lock(); try{ long accessTime = holder.getAccessTime(); if (config.isExpireAfterAccess()) { long expireAfterAccess = config.getExpireAfterAccessInMillis(); if (now >= accessTime + expireAfterAccess) { return CacheGetResult.EXPIRED_WITHOUT_MSG; } } holder.setAccessTime(now); } finally {...

```yaml jetcache: statIntervalMinutes: 15 areaInCacheName: false hiddenPackages: cn.privchat local: default: type: caffeine #other choose:linkedhashmap / caffeine keyConvertor: jackson #other choose:fastjson2/jackson limit: 1000 remote: default: type: redisson keyConvertor: jackson #other choose:fastjson2/jackson...

以json序列化方式举例 如果使用注解的方式的时候, 可以注解里定义 序列化的class,或者根据方法返回类型确定要序列化的类型, 这样序列化的时候,就可以不写入类信息, 反序列化的时候也可以确定类型

yaml已配置 local、remote,代码示例: ```java public interface UserService { @Cached(name = "userCache-", key = "#userId", expire = 100) User getUserById(String userId); @CacheUpdate(name = "userCache-", key = "#user.userId", value = "#user") void updateUser(User...

使用 `RedisCacheBuilder` 进行配置 **JetCache** 时,`jedisPool` 必须为 `redis.clients.jedis.util.Pool`。但公司有自己的 Redis 连接实现,该实现无法与 `RedisCacheBuilder` 兼容。因而想通过自定义 `RedisCache` 替换默认的 `RedisCache`,有最佳实践吗?

org.springframework.boot spring-boot-starter-data-redis 2.3.12.RELEASE redis.clients jedis io.lettuce lettuce-core 5.3.7.RELEASE compile com.alicp.jetcache jetcache-starter-redis-lettuce 2.7.5 为什么还是报错:jedis问题,不能使用lettuce吗? Caused by: java.lang.ClassNotFoundException: redis.clients.jedis.HostAndPort Caused by: java.lang.NoClassDefFoundError: redis/clients/jedis/HostAndPort

remote: default: type: redis.lettuce # other choose:redis/redis.lettuce/redisson uri: redis://r0&2o7^[email protected]:6379 # redis://密码@IP:端口/库 错误: sed by: java.net.URISyntaxException: Illegal character in authority at index 8: redis://r0&2o7^[email protected]:6379

### 版本 ![image](https://github.com/alibaba/jetcache/assets/1713001/c315f332-c1b2-4d0f-829f-1acd83de0c03) ### 配置 ``` jetcache: statIntervalMinutes: 30 areaInCacheName: false local: default: type: linkedhashmap keyConvertor: fastjson2 limit: 500 remote: default: type: redis.lettuce keyConvertor: fastjson2 valueEncoder: java valueDecoder: java mode:...

如题,如果并发量很大,短期内(例如一个小时)查一个不存在的key,流量就进入二级缓存,即使是redis,也可能扛不住的情况,但后期(例如过了一个小时)由于业务原因这个key可能存在了;业务对一致性要求不高,1分钟内能保持一致都接受,有解决方案吗