alibaba / jetcache

JetCache is a Java cache framework.
Apache License 2.0
5.03k stars 1.05k forks source link

Update Config.md #809

Closed Tingfing6 closed 10 months ago

Tingfing6 commented 1 year ago

少了 keyPrefix 配置,不配的话缓存的 key 前缀都为 null

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.

areyouok commented 1 year ago

这个问题如何重现?我用demo试了一下都没问题

Tingfing6 commented 1 year ago

这个问题如何重现?我用demo试了一下都没问题

我使用的是以下依赖版本,只要不配置 keyPrefix redis 中 key 前缀就会是 null

com.alicp.jetcache jetcache-starter-redis 2.6.7
areyouok commented 1 year ago

我不能重现

Tingfing6 commented 1 year ago
# 这是我的配置,你把 keyPrefix 配置去掉就能复现
jetcache:
statIntervalMinutes: 15
areaInCacheName: false
local:
default:
keyPrefix: "aimperson:"
type: caffeine
keyConvertor: fastjson
remote:
default:
keyPrefix: "aimperson:"
type: redis
keyConvertor: fastjson
broadcastChannel: aimperson
valueEncoder: java
valueDecoder: java
poolConfig:
minIdle: 5
maxIdle: 20
maxTotal: 50
host: 
password:
port:
areyouok commented 1 year ago

我无法重现,你需要给出完整的重现代码。sample目录里面有demo,你在RedisCache.do_PUT(或对应的其它类)方法里面打个断点或者日志输出一下就看到了,发送给redis的newKey里面并没有"null"

areyouok commented 10 months ago

如果没有更新问题我就先关闭了