<
从版本< 6.1 >
xu yang编辑
在2022/04/27 12:25上
到版本
xu yang编辑
在2022/04/27 12:30上
>
修改评论 该版本没有评论

Summary

Details

Page properties
Content
... ... @@ -20,21 +20,28 @@
20 20  @startuml
21 21  start
22 22  
23 -if (调用expireIfNeeded方法判断key是否过期) then(1)
24 -if (当前环境为主节点) then(yes)
25 -:返回null;
23 +note left
24 +返回1代表已经过期
25 +endnote
26 +if(调用expireIfNeeded方法判断key是否过期)then(1)
27 +if(当前环境为主节点)then(yes)
28 +:返回null;
26 26  stop
27 27  endif
28 28  
29 -if (当前环境为从节点,并且命令为读的时候,那说明key过期是安全的) then(yes)
32 +if(当前环境为从节点,并且命令为读的时候,那说明key过期是安全的)then(yes)
30 30  :返回null;
31 31  stop
32 32  endif
33 33  endif
34 34  
35 -:调用lookupKey方法,查询value的值;
38 +:调用lookupKey方法,查询value的值;
39 +if(返回值为空)then(yes)
40 +:缓存命中+1;
41 +else(no)
42 +:缓存非命中+1;
43 +endif
36 36  
37 -
38 38  :返回查询的结果;
39 39  
40 40  end