Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_57962205
redisson
提交
8345e24c
R
redisson
项目概览
weixin_57962205
/
redisson
与 Fork 源项目一致
从无法访问的项目Fork
通知
10
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
redisson
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
8345e24c
编写于
2月 07, 2018
作者:
N
Nikita
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixed - remove hset command invocation during entry loading. #1282
上级
1b54139f
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
1 addition
and
21 deletion
+1
-21
redisson/src/main/java/org/redisson/RedissonMapCache.java
redisson/src/main/java/org/redisson/RedissonMapCache.java
+1
-21
未找到文件。
redisson/src/main/java/org/redisson/RedissonMapCache.java
浏览文件 @
8345e24c
...
@@ -151,8 +151,6 @@ public class RedissonMapCache<K, V> extends RedissonMap<K, V> implements RMapCac
...
@@ -151,8 +151,6 @@ public class RedissonMapCache<K, V> extends RedissonMap<K, V> implements RMapCac
" local expireIdle = redis.call('zscore', KEYS[3], ARGV[2]); "
+
" local expireIdle = redis.call('zscore', KEYS[3], ARGV[2]); "
+
" if expireIdle ~= false then "
+
" if expireIdle ~= false then "
+
" if tonumber(expireIdle) > tonumber(ARGV[1]) then "
+
" if tonumber(expireIdle) > tonumber(ARGV[1]) then "
+
" local value = struct.pack('dLc0', t, string.len(val), val); "
+
" redis.call('hset', KEYS[1], ARGV[2], value); "
+
" redis.call('zadd', KEYS[3], t + tonumber(ARGV[1]), ARGV[2]); "
+
" redis.call('zadd', KEYS[3], t + tonumber(ARGV[1]), ARGV[2]); "
+
" end ;"
+
" end ;"
+
" expireDate = math.min(expireDate, tonumber(expireIdle)) "
+
" expireDate = math.min(expireDate, tonumber(expireIdle)) "
+
...
@@ -194,8 +192,6 @@ public class RedissonMapCache<K, V> extends RedissonMap<K, V> implements RMapCac
...
@@ -194,8 +192,6 @@ public class RedissonMapCache<K, V> extends RedissonMap<K, V> implements RMapCac
" local expireIdle = redis.call('zscore', KEYS[3], key); "
+
" local expireIdle = redis.call('zscore', KEYS[3], key); "
+
" if expireIdle ~= false then "
+
" if expireIdle ~= false then "
+
" if tonumber(expireIdle) > tonumber(ARGV[1]) then "
+
" if tonumber(expireIdle) > tonumber(ARGV[1]) then "
+
" local value = struct.pack('dLc0', t, string.len(val), val); "
+
" redis.call('hset', KEYS[1], key, value); "
+
" redis.call('zadd', KEYS[3], t + tonumber(ARGV[1]), key); "
+
" redis.call('zadd', KEYS[3], t + tonumber(ARGV[1]), key); "
+
" end; "
+
" end; "
+
" expireDate = math.min(expireDate, tonumber(expireIdle)) "
+
" expireDate = math.min(expireDate, tonumber(expireIdle)) "
+
...
@@ -250,8 +246,6 @@ public class RedissonMapCache<K, V> extends RedissonMap<K, V> implements RMapCac
...
@@ -250,8 +246,6 @@ public class RedissonMapCache<K, V> extends RedissonMap<K, V> implements RMapCac
" local expireIdle = redis.call('zscore', KEYS[3], key); "
+
" local expireIdle = redis.call('zscore', KEYS[3], key); "
+
" if expireIdle ~= false then "
+
" if expireIdle ~= false then "
+
" if tonumber(expireIdle) > currentTime then "
+
" if tonumber(expireIdle) > currentTime then "
+
" local value = struct.pack('dLc0', t, string.len(val), val); "
+
" redis.call('hset', KEYS[1], key, value); "
+
" redis.call('zadd', KEYS[3], t + currentTime, key); "
+
" redis.call('zadd', KEYS[3], t + currentTime, key); "
+
" else "
+
" else "
+
" map[i] = false; "
+
" map[i] = false; "
+
...
@@ -472,8 +466,6 @@ public class RedissonMapCache<K, V> extends RedissonMap<K, V> implements RMapCac
...
@@ -472,8 +466,6 @@ public class RedissonMapCache<K, V> extends RedissonMap<K, V> implements RMapCac
+
"local expireIdle = redis.call('zscore', KEYS[3], ARGV[2]); "
+
"local expireIdle = redis.call('zscore', KEYS[3], ARGV[2]); "
+
"if expireIdle ~= false then "
+
"if expireIdle ~= false then "
+
"if tonumber(expireIdle) > tonumber(ARGV[1]) then "
+
"if tonumber(expireIdle) > tonumber(ARGV[1]) then "
+
"local value = struct.pack('dLc0', t, string.len(val), val); "
+
"redis.call('hset', KEYS[1], ARGV[2], value); "
+
"redis.call('zadd', KEYS[3], t + tonumber(ARGV[1]), ARGV[2]); "
+
"redis.call('zadd', KEYS[3], t + tonumber(ARGV[1]), ARGV[2]); "
+
"end; "
+
"end; "
+
"expireDate = math.min(expireDate, tonumber(expireIdle)) "
+
"expireDate = math.min(expireDate, tonumber(expireIdle)) "
...
@@ -646,8 +638,6 @@ public class RedissonMapCache<K, V> extends RedissonMap<K, V> implements RMapCac
...
@@ -646,8 +638,6 @@ public class RedissonMapCache<K, V> extends RedissonMap<K, V> implements RMapCac
+
"local expireIdle = redis.call('zscore', KEYS[3], ARGV[2]); "
+
"local expireIdle = redis.call('zscore', KEYS[3], ARGV[2]); "
+
"if expireIdle ~= false then "
+
"if expireIdle ~= false then "
+
"if tonumber(expireIdle) > tonumber(ARGV[1]) then "
+
"if tonumber(expireIdle) > tonumber(ARGV[1]) then "
+
"local value = struct.pack('dLc0', t, string.len(val), val); "
+
"redis.call('hset', KEYS[1], ARGV[2], value); "
+
"redis.call('zadd', KEYS[3], t + tonumber(ARGV[1]), ARGV[2]); "
+
"redis.call('zadd', KEYS[3], t + tonumber(ARGV[1]), ARGV[2]); "
+
"end; "
+
"end; "
+
"expireDate = math.min(expireDate, tonumber(expireIdle)) "
+
"expireDate = math.min(expireDate, tonumber(expireIdle)) "
...
@@ -665,7 +655,7 @@ public class RedissonMapCache<K, V> extends RedissonMap<K, V> implements RMapCac
...
@@ -665,7 +655,7 @@ public class RedissonMapCache<K, V> extends RedissonMap<K, V> implements RMapCac
+
"local msg = struct.pack('Lc0Lc0', string.len(ARGV[2]), ARGV[2], string.len(ARGV[3]), ARGV[3]); "
+
"local msg = struct.pack('Lc0Lc0', string.len(ARGV[2]), ARGV[2], string.len(ARGV[3]), ARGV[3]); "
+
"redis.call('publish', KEYS[4], msg); "
+
"redis.call('publish', KEYS[4], msg); "
+
"end; "
+
"end; "
+
"local newValuePack = struct.pack('dLc0', t
+ tonumber(ARGV[1])
, string.len(newValue), newValue); "
+
"local newValuePack = struct.pack('dLc0', t, string.len(newValue), newValue); "
+
"redis.call('hset', KEYS[1], ARGV[2], newValuePack); "
+
"redis.call('hset', KEYS[1], ARGV[2], newValuePack); "
// last access time
// last access time
...
@@ -1250,8 +1240,6 @@ public class RedissonMapCache<K, V> extends RedissonMap<K, V> implements RMapCac
...
@@ -1250,8 +1240,6 @@ public class RedissonMapCache<K, V> extends RedissonMap<K, V> implements RMapCac
+
"local expireIdle = redis.call('zscore', KEYS[2], key); "
+
"local expireIdle = redis.call('zscore', KEYS[2], key); "
+
"if expireIdle ~= false then "
+
"if expireIdle ~= false then "
+
"if tonumber(expireIdle) > currentTime then "
+
"if tonumber(expireIdle) > currentTime then "
+
"local value = struct.pack('dLc0', t, string.len(val), val); "
+
"redis.call('hset', KEYS[1], key, value); "
+
"redis.call('zadd', KEYS[2], t + currentTime, key); "
+
"redis.call('zadd', KEYS[2], t + currentTime, key); "
+
"end; "
+
"end; "
+
"end; "
+
"end; "
...
@@ -1386,8 +1374,6 @@ public class RedissonMapCache<K, V> extends RedissonMap<K, V> implements RMapCac
...
@@ -1386,8 +1374,6 @@ public class RedissonMapCache<K, V> extends RedissonMap<K, V> implements RMapCac
+
"local expireIdle = redis.call('zscore', KEYS[3], ARGV[2]); "
+
"local expireIdle = redis.call('zscore', KEYS[3], ARGV[2]); "
+
"if expireIdle ~= false then "
+
"if expireIdle ~= false then "
+
"if tonumber(expireIdle) > tonumber(ARGV[1]) then "
+
"if tonumber(expireIdle) > tonumber(ARGV[1]) then "
+
"local value = struct.pack('dLc0', t, string.len(val), val); "
+
"redis.call('hset', KEYS[1], ARGV[2], value); "
+
"redis.call('zadd', KEYS[3], t + tonumber(ARGV[1]), ARGV[2]); "
+
"redis.call('zadd', KEYS[3], t + tonumber(ARGV[1]), ARGV[2]); "
+
"end; "
+
"end; "
+
"expireDate = math.min(expireDate, tonumber(expireIdle)) "
+
"expireDate = math.min(expireDate, tonumber(expireIdle)) "
...
@@ -1850,8 +1836,6 @@ public class RedissonMapCache<K, V> extends RedissonMap<K, V> implements RMapCac
...
@@ -1850,8 +1836,6 @@ public class RedissonMapCache<K, V> extends RedissonMap<K, V> implements RMapCac
+
"local expireIdle = redis.call('zscore', KEYS[3], key); "
+
"local expireIdle = redis.call('zscore', KEYS[3], key); "
+
"if expireIdle ~= false then "
+
"if expireIdle ~= false then "
+
"if tonumber(expireIdle) > tonumber(ARGV[1]) then "
+
"if tonumber(expireIdle) > tonumber(ARGV[1]) then "
+
"local value = struct.pack('dLc0', t, string.len(val), val); "
+
"redis.call('hset', KEYS[1], key, value); "
+
"redis.call('zadd', KEYS[3], t + tonumber(ARGV[1]), key); "
+
"redis.call('zadd', KEYS[3], t + tonumber(ARGV[1]), key); "
+
"if maxSize ~= nil and maxSize ~= 0 then "
+
"if maxSize ~= nil and maxSize ~= 0 then "
+
" redis.call('zadd', KEYS[4], tonumber(ARGV[1]), key); "
+
" redis.call('zadd', KEYS[4], tonumber(ARGV[1]), key); "
...
@@ -1893,8 +1877,6 @@ public class RedissonMapCache<K, V> extends RedissonMap<K, V> implements RMapCac
...
@@ -1893,8 +1877,6 @@ public class RedissonMapCache<K, V> extends RedissonMap<K, V> implements RMapCac
+
"local expireIdle = redis.call('zscore', KEYS[3], key); "
+
"local expireIdle = redis.call('zscore', KEYS[3], key); "
+
"if expireIdle ~= false then "
+
"if expireIdle ~= false then "
+
"if tonumber(expireIdle) > tonumber(ARGV[1]) then "
+
"if tonumber(expireIdle) > tonumber(ARGV[1]) then "
+
"local value = struct.pack('dLc0', t, string.len(val), val); "
+
"redis.call('hset', KEYS[1], key, value); "
+
"redis.call('zadd', KEYS[3], t + tonumber(ARGV[1]), key); "
+
"redis.call('zadd', KEYS[3], t + tonumber(ARGV[1]), key); "
+
"if maxSize ~= nil and maxSize ~= 0 then "
+
"if maxSize ~= nil and maxSize ~= 0 then "
+
" redis.call('zadd', KEYS[4], tonumber(ARGV[1]), key); "
+
" redis.call('zadd', KEYS[4], tonumber(ARGV[1]), key); "
...
@@ -1939,8 +1921,6 @@ public class RedissonMapCache<K, V> extends RedissonMap<K, V> implements RMapCac
...
@@ -1939,8 +1921,6 @@ public class RedissonMapCache<K, V> extends RedissonMap<K, V> implements RMapCac
+
"local expireIdle = redis.call('zscore', KEYS[3], key); "
+
"local expireIdle = redis.call('zscore', KEYS[3], key); "
+
"if expireIdle ~= false then "
+
"if expireIdle ~= false then "
+
"if tonumber(expireIdle) > tonumber(ARGV[1]) then "
+
"if tonumber(expireIdle) > tonumber(ARGV[1]) then "
+
"local value = struct.pack('dLc0', t, string.len(val), val); "
+
"redis.call('hset', KEYS[1], key, value); "
+
"redis.call('zadd', KEYS[3], t + tonumber(ARGV[1]), key); "
+
"redis.call('zadd', KEYS[3], t + tonumber(ARGV[1]), key); "
+
"if maxSize ~= nil and maxSize ~= 0 then "
+
"if maxSize ~= nil and maxSize ~= 0 then "
+
" redis.call('zadd', KEYS[4], tonumber(ARGV[1]), key); "
+
" redis.call('zadd', KEYS[4], tonumber(ARGV[1]), key); "
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录