root
|
1e673cdf83
|
fix(cache): 构造期校验配置项,误配在装配阶段即 fail-fast
default/null-ttl-seconds、jitter-ratio、breakdown 的 lock-ttl-ms/wait-timeout-ms/
wait-interval-ms 原无校验,负值/越界要到运行期(写入非法 TTL、抖动放大数倍)才暴露。
在 RedisCacheEnhanceTemplate 构造器手工校验,非法即抛 IllegalArgumentException;
不引 hibernate-validator,守住零新依赖。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-26 09:54:55 +08:00 |
|
root
|
0facafc745
|
fix(cache): 击穿等待响应中断 + interval 兜底,消除空转与无限循环
未抢到锁的自旋等待原以 waited += waitIntervalMs 推进:waitIntervalMs<=0 时永不
前进 → 无限循环 hang;且 sleep 吞中断后不退出,被中断时以 Redis 往返为节奏空转
到超时、不响应协作式取消。改为溢出安全的 deadline 截止判断 + Math.max(1,interval)
兜底,sleep 返回中断信号、被中断即 break 降级并保留中断标志。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-26 09:51:42 +08:00 |
|
root
|
ba2606ea46
|
fix(cache): set/expire/getOrLoad 对 ttl<=0 fail-fast,杜绝 expire 误删 key
expire(key, ttl<=0) 经 applyJitter 透传 0/负值,Redis EXPIRE 非正值会立即删 key
并返回 1,使"续期"静默删数据且报 true;set(ttl<=0) 则下发非法过期抛
RedisSystemException。统一在 set/expire/doGetOrLoad 入口 requirePositiveTtl 校验,
非正 TTL 直接抛 IllegalArgumentException。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-26 09:46:55 +08:00 |
|
root
|
c4ad3670fc
|
feat(cache): 自动装配 + spring.factories 注册
|
2026-06-26 04:59:41 +08:00 |
|
root
|
037fdc4f9c
|
feat(cache): getOrLoad 三防(空值穿透 + TTL 抖动雪崩 + 互斥锁击穿 + 超时降级)
|
2026-06-26 04:55:42 +08:00 |
|
root
|
d164b89067
|
feat(cache): 模板读写基础(set/get/delete/exists/expire + TTL 抖动 + 滑动续期)
|
2026-06-26 04:51:07 +08:00 |
|
root
|
9605dca962
|
feat(cache): 配置属性 redis-cache.*(TTL/抖动/滑动/击穿锁)
|
2026-06-26 04:43:28 +08:00 |
|
root
|
ecbdfd8907
|
feat(cache): 值编解码器(fastjson 序列化 + 空值标记)
|
2026-06-26 04:41:02 +08:00 |
|
root
|
ce370afa83
|
feat(cache): 缓存常量与 key 构造器(前缀 + 环境隔离 + 锁 key 派生)
|
2026-06-26 04:38:02 +08:00 |
|