新增 锁管理器,支持本地锁和分布式锁,当开启集群时,自动使用分布式锁

This commit is contained in:
thinkgem
2025-09-24 22:01:36 +08:00
parent 4741e75975
commit e2b7db9668
3 changed files with 34 additions and 7 deletions

View File

@@ -632,10 +632,10 @@ j2cache:
redis: redis:
# 存储模式 generic|hash # 存储模式 generic|hash
storage: hash storage: hash
# 通知订阅的通道名
channel: jeesite
# 缓存命名空间名 # 缓存命名空间名
namespace: jeesite namespace: jeesite
# 通知订阅的通道名
channel: ${j2cache.redis.namespace}
# 消息监听器 # 消息监听器
#listener: #listener:
# taskPool: # taskPool:
@@ -652,6 +652,15 @@ j2cache:
# blend -> 两种模式一起运作,对于各个节点缓存准确以及及时性要求高的可以使用,正常用前两种模式中一个就可 # blend -> 两种模式一起运作,对于各个节点缓存准确以及及时性要求高的可以使用,正常用前两种模式中一个就可
cache_clean_mode: passive cache_clean_mode: passive
# 锁管理器支持本地锁和分布式锁当isClusterMode开启时自动使用分布式锁
lockManager:
# 分布式锁
redis:
# 锁名称前缀多系统共用Redis时修改
keyPrefix: ${j2cache.redis.namespace}:lockKey
# 检查锁的等待毫秒数
sleepMillis: 100
# Web 相关 # Web 相关
web: web:

View File

@@ -780,10 +780,10 @@ session:
# redis: # redis:
# # 存储模式 generic|hash # # 存储模式 generic|hash
# storage: hash # storage: hash
# # 通知订阅的通道名
# channel: jeesite
# # 缓存命名空间名 # # 缓存命名空间名
# namespace: jeesite # namespace: jeesite
# # 通知订阅的通道名
# channel: ${j2cache.redis.namespace}
# # 消息监听器 # # 消息监听器
# listener: # listener:
# taskPool: # taskPool:
@@ -800,6 +800,15 @@ session:
# # blend -> 两种模式一起运作,对于各个节点缓存准确以及及时性要求高的可以使用,正常用前两种模式中一个就可 # # blend -> 两种模式一起运作,对于各个节点缓存准确以及及时性要求高的可以使用,正常用前两种模式中一个就可
# cache_clean_mode: passive # cache_clean_mode: passive
# 锁管理器支持本地锁和分布式锁当isClusterMode开启时自动使用分布式锁
#lockManager:
# # 分布式锁
# redis:
# # 锁名称前缀多系统共用Redis时修改
# keyPrefix: ${j2cache.redis.namespace}:lockKey
# # 检查锁的等待毫秒数
# sleepMillis: 100
# Web 相关 # Web 相关
web: web:

View File

@@ -780,10 +780,10 @@ session:
# redis: # redis:
# # 存储模式 generic|hash # # 存储模式 generic|hash
# storage: hash # storage: hash
# # 通知订阅的通道名
# channel: jeesite
# # 缓存命名空间名 # # 缓存命名空间名
# namespace: jeesite # namespace: jeesite
# # 通知订阅的通道名
# channel: ${j2cache.redis.namespace}
# # 消息监听器 # # 消息监听器
# listener: # listener:
# taskPool: # taskPool:
@@ -800,6 +800,15 @@ session:
# # blend -> 两种模式一起运作,对于各个节点缓存准确以及及时性要求高的可以使用,正常用前两种模式中一个就可 # # blend -> 两种模式一起运作,对于各个节点缓存准确以及及时性要求高的可以使用,正常用前两种模式中一个就可
# cache_clean_mode: passive # cache_clean_mode: passive
# 锁管理器支持本地锁和分布式锁当isClusterMode开启时自动使用分布式锁
#lockManager:
# # 分布式锁
# redis:
# # 锁名称前缀多系统共用Redis时修改
# keyPrefix: ${j2cache.redis.namespace}:lockKey
# # 检查锁的等待毫秒数
# sleepMillis: 100
# Web 相关 # Web 相关
web: web: