
{"id":1122,"date":"2020-10-14T23:54:55","date_gmt":"2020-10-14T15:54:55","guid":{"rendered":"https:\/\/www.changxuan.top\/?p=1122"},"modified":"2020-12-19T15:39:13","modified_gmt":"2020-12-19T07:39:13","slug":"redis%e4%b8%ad%e7%9a%84%e5%ad%97%e5%85%b8","status":"publish","type":"post","link":"https:\/\/www.changxuan.top\/?p=1122","title":{"rendered":"Redis\u4e2d\u7684\u5b57\u5178"},"content":{"rendered":"<section id=\"nice\" data-tool=\"mdnice\u7f16\u8f91\u5668\" data-website=\"https:\/\/www.mdnice.com\" style=\"font-size: 16px; color: black; padding: 0 10px; line-height: 1.6; word-spacing: 0px; letter-spacing: 0px; word-break: break-word; word-wrap: break-word; text-align: left; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;\">\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 22px;\"><span class=\"prefix\" style=\"display: none;\"><\/span><span class=\"content\">\u7b80\u4ecb<\/span><span class=\"suffix\"><\/span><\/h2>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;\">\u5b57\u5178\u662f\u4e00\u79cd\u5728 Redis \u4e2d\u9ad8\u9891\u4f7f\u7528\u7684\u7528\u4e8e\u4fdd\u5b58\u952e\u503c\u5bf9\u7684\u62bd\u8c61\u6570\u636e\u7ed3\u6784\uff0c\u5728 Java \u4e2d\u5e38\u7528\u7684\u6709 <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">HasmMap<\/code> \u7b49\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;\">\u7531\u4e8e\u5b57\u5178\u4e2d\u952e\u7684\u552f\u4e00\u6027\uff0c\u6240\u4ee5\u5728 Redis \u4e2d\u5f97\u5230\u4e86\u5e7f\u6cdb\u7684\u5e94\u7528\u3002<\/p>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 22px;\"><span class=\"prefix\" style=\"display: none;\"><\/span><span class=\"content\">\u5b9e\u73b0<\/span><span class=\"suffix\"><\/span><\/h2>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;\">Redis \u4e2d\u7684\u5b57\u5178\u662f\u57fa\u4e8e<code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">\u54c8\u5e0c\u8868<\/code> (dictht, dict hash table)\u5b9e\u73b0\u7684\uff0c\u54c8\u5e0c\u8868\u4e2d\u7684\u6bcf\u4e2a\u8282\u70b9\u4fdd\u5b58\u4e00\u4e2a\u952e\u503c\u5bf9\u3002\u54c8\u5e0c\u8868\u7684\u7ed3\u6784\u4f53\u5b9a\u4e49\u5982\u4e0b\uff1a<\/p>\n<pre class=\"custom\" data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px; margin-bottom: 10px; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\"><span style=\"display: block; background: url(https:\/\/www.changxuan.top\/wp-content\/uploads\/2020\/11\/point.png); height: 30px; width: 100%; background-size: 40px; background-repeat: no-repeat; background-color: #fafafa; margin-bottom: -7px; border-radius: 5px; background-position: 10px 10px;\"><\/span><code class=\"hljs\" style=\"overflow-x: auto; padding: 16px; color: #383a42; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; font-size: 12px; -webkit-overflow-scrolling: touch; padding-top: 15px; background: #fafafa; border-radius: 5px;\"><span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">typedef<\/span>&nbsp;<span class=\"hljs-class\" style=\"line-height: 26px;\"><span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">struct<\/span>&nbsp;<span class=\"hljs-title\" style=\"color: #c18401; line-height: 26px;\">dictht<\/span>&nbsp;{<\/span>\n&nbsp;&nbsp;<span class=\"hljs-comment\" style=\"color: #a0a1a7; font-style: italic; line-height: 26px;\">\/\/&nbsp;\u54c8\u5e0c\u8868\u6570\u7ec4<\/span>\n&nbsp;&nbsp;dictEntry&nbsp;**table;\n&nbsp;&nbsp;<span class=\"hljs-comment\" style=\"color: #a0a1a7; font-style: italic; line-height: 26px;\">\/\/&nbsp;\u54c8\u5e0c\u8868\u5927\u5c0f<\/span>\n&nbsp;&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">unsigned<\/span>&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">long<\/span>&nbsp;size;\n&nbsp;&nbsp;<span class=\"hljs-comment\" style=\"color: #a0a1a7; font-style: italic; line-height: 26px;\">\/\/&nbsp;\u54c8\u5e0c\u8868\u5927\u5c0f\u63a9\u7801\uff0c\u7528\u4e8e\u8ba1\u7b97\u7d22\u5f15\u503c&nbsp;size&nbsp;-&nbsp;1,\u7528\u6765\u8ba1\u7b97\u952e\u503c\u5bf9\u653e\u5728\u54ea\u4e2a\u7d22\u5f15\u4e0a<\/span>\n&nbsp;&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">unsigned<\/span>&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">long<\/span>&nbsp;sizemask;\n&nbsp;&nbsp;<span class=\"hljs-comment\" style=\"color: #a0a1a7; font-style: italic; line-height: 26px;\">\/\/&nbsp;\u54c8\u5e0c\u8868\u5df2\u6709\u8282\u70b9\u7684\u6570\u91cf<\/span>\n&nbsp;&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">unsigned<\/span>&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">long<\/span>&nbsp;used;\n}&nbsp;dictht;\n<\/code><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;\">\u54c8\u5e0c\u8868\u8282\u70b9 <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">dictEntry<\/code> \u7684\u7ed3\u6784\u5219\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<pre class=\"custom\" data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px; margin-bottom: 10px; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\"><span style=\"display: block; background: url(https:\/\/www.changxuan.top\/wp-content\/uploads\/2020\/11\/point.png); height: 30px; width: 100%; background-size: 40px; background-repeat: no-repeat; background-color: #fafafa; margin-bottom: -7px; border-radius: 5px; background-position: 10px 10px;\"><\/span><code class=\"hljs\" style=\"overflow-x: auto; padding: 16px; color: #383a42; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; font-size: 12px; -webkit-overflow-scrolling: touch; padding-top: 15px; background: #fafafa; border-radius: 5px;\"><span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">typedef<\/span>&nbsp;<span class=\"hljs-class\" style=\"line-height: 26px;\"><span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">struct<\/span>&nbsp;<span class=\"hljs-title\" style=\"color: #c18401; line-height: 26px;\">dictEntry<\/span>&nbsp;{<\/span>\n&nbsp;&nbsp;<span class=\"hljs-comment\" style=\"color: #a0a1a7; font-style: italic; line-height: 26px;\">\/\/&nbsp;\u952e<\/span>\n&nbsp;&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">void<\/span>&nbsp;*key;\n&nbsp;&nbsp;<span class=\"hljs-comment\" style=\"color: #a0a1a7; font-style: italic; line-height: 26px;\">\/\/&nbsp;\u503c<\/span>\n&nbsp;&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">union<\/span>&nbsp;{\n&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">void<\/span>&nbsp;*val;\n&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">uint64_t<\/span>&nbsp;u64;\n&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">int64_t<\/span>&nbsp;s64;\n&nbsp;&nbsp;}v;\n&nbsp;&nbsp;<span class=\"hljs-comment\" style=\"color: #a0a1a7; font-style: italic; line-height: 26px;\">\/\/&nbsp;\u6307\u5411\u4e0b\u4e2a\u54c8\u5e0c\u8868\u8282\u70b9<\/span>\n&nbsp;&nbsp;<span class=\"hljs-class\" style=\"line-height: 26px;\"><span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">struct<\/span>&nbsp;<span class=\"hljs-title\" style=\"color: #c18401; line-height: 26px;\">dictEntry<\/span>&nbsp;*<span class=\"hljs-title\" style=\"color: #c18401; line-height: 26px;\">next<\/span>;<\/span>\n}&nbsp;dictEntry;\n<\/code><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;\"><code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">dictEntry<\/code> \u4e2d\u7684\u503c\u6709\u4e9b\u7279\u522b\uff0c\u5b83\u8868\u793a\u5176\u503c\u6709\u53ef\u80fd\u662f\u4e00\u4e2a\u6307\u9488\u6216\u8005\u662f\u4e00\u4e2a <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">uint64_t<\/code> \u6574\u6570\uff0c\u6216\u8005\u662f\u4e00\u4e2a <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">int64_t<\/code> \u6574\u6570\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;\">\u56e0\u4e3a\u5b58\u5728 <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">next<\/code> \u5c5e\u6027\uff0c\u5f88\u663e\u7136\u5b83\u662f\u4f7f\u7528<code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">\u94fe\u5730\u5740\u6cd5<\/code>\u89e3\u51b3\u7684\u54c8\u5e0c\u952e\u51b2\u7a81\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;\">\u63a5\u4e0b\u6765\u6211\u4eec\u770b\u4e00\u4e0b\u5b57\u5178\uff08dict\uff09\u7684\u5b9a\u4e49\uff1a<\/p>\n<pre class=\"custom\" data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px; margin-bottom: 10px; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\"><span style=\"display: block; background: url(https:\/\/www.changxuan.top\/wp-content\/uploads\/2020\/11\/point.png); height: 30px; width: 100%; background-size: 40px; background-repeat: no-repeat; background-color: #fafafa; margin-bottom: -7px; border-radius: 5px; background-position: 10px 10px;\"><\/span><code class=\"hljs\" style=\"overflow-x: auto; padding: 16px; color: #383a42; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; font-size: 12px; -webkit-overflow-scrolling: touch; padding-top: 15px; background: #fafafa; border-radius: 5px;\"><span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">typedef<\/span>&nbsp;<span class=\"hljs-class\" style=\"line-height: 26px;\"><span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">struct<\/span>&nbsp;<span class=\"hljs-title\" style=\"color: #c18401; line-height: 26px;\">dict<\/span>&nbsp;{<\/span>\n&nbsp;&nbsp;<span class=\"hljs-comment\" style=\"color: #a0a1a7; font-style: italic; line-height: 26px;\">\/\/&nbsp;\u7c7b\u578b\u7279\u5b9a\u51fd\u6570<\/span>\n&nbsp;&nbsp;dictType&nbsp;*type;\n&nbsp;&nbsp;<span class=\"hljs-comment\" style=\"color: #a0a1a7; font-style: italic; line-height: 26px;\">\/\/&nbsp;\u79c1\u6709\u6570\u636e<\/span>\n&nbsp;&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">void<\/span>&nbsp;*privdata;\n&nbsp;&nbsp;<span class=\"hljs-comment\" style=\"color: #a0a1a7; font-style: italic; line-height: 26px;\">\/\/&nbsp;\u54c8\u5e0c\u8868<\/span>\n&nbsp;&nbsp;dictht&nbsp;ht[<span class=\"hljs-number\" style=\"color: #986801; line-height: 26px;\">2<\/span>];\n&nbsp;&nbsp;<span class=\"hljs-comment\" style=\"color: #a0a1a7; font-style: italic; line-height: 26px;\">\/\/&nbsp;rehash&nbsp;\u7d22\u5f15&nbsp;\u5f53\u4e0d\u5728\u8fdb\u884c&nbsp;rehash&nbsp;\u7684\u65f6\u5019\uff0c\u503c\u4e3a-1<\/span>\n&nbsp;&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">int<\/span>&nbsp;trehashids;&nbsp;\n}&nbsp;dict;\n<\/code><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;\">\u5c5e\u6027 <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">type<\/code> \u662f\u4e00\u4e2a\u6307\u5411 <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">dictType<\/code> \u7ed3\u6784\u4f53\u7684\u6307\u9488\uff0c\u6bcf\u4e2a <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">dictType<\/code> \u4fdd\u5b58\u4e86\u4e00\u4e9b\u7528\u4e8e\u64cd\u4f5c\u7279\u5b9a\u7c7b\u578b\u952e\u503c\u5bf9\u7684\u51fd\u6570\u3002<\/p>\n<pre class=\"custom\" data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px; margin-bottom: 10px; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\"><span style=\"display: block; background: url(https:\/\/www.changxuan.top\/wp-content\/uploads\/2020\/11\/point.png); height: 30px; width: 100%; background-size: 40px; background-repeat: no-repeat; background-color: #fafafa; margin-bottom: -7px; border-radius: 5px; background-position: 10px 10px;\"><\/span><code class=\"hljs\" style=\"overflow-x: auto; padding: 16px; color: #383a42; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; font-size: 12px; -webkit-overflow-scrolling: touch; padding-top: 15px; background: #fafafa; border-radius: 5px;\"><span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">typedef<\/span>&nbsp;<span class=\"hljs-class\" style=\"line-height: 26px;\"><span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">struct<\/span>&nbsp;<span class=\"hljs-title\" style=\"color: #c18401; line-height: 26px;\">dictType<\/span>&nbsp;{<\/span>\n&nbsp;<span class=\"hljs-comment\" style=\"color: #a0a1a7; font-style: italic; line-height: 26px;\">\/\/&nbsp;\u8ba1\u7b97\u54c8\u5e0c\u503c\u7684\u51fd\u6570<\/span>\n&nbsp;<span class=\"hljs-function\" style=\"line-height: 26px;\"><span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">unsigned<\/span>&nbsp;<span class=\"hljs-title\" style=\"color: #4078f2; line-height: 26px;\">int<\/span>&nbsp;<span class=\"hljs-params\" style=\"line-height: 26px;\">(*hashFunction)<\/span><span class=\"hljs-params\" style=\"line-height: 26px;\">(<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">const<\/span>&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">void<\/span>&nbsp;*key)<\/span><\/span>;\n&nbsp;<span class=\"hljs-comment\" style=\"color: #a0a1a7; font-style: italic; line-height: 26px;\">\/\/&nbsp;\u590d\u5236\u952e\u7684\u51fd\u6570<\/span>\n&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">void<\/span>&nbsp;*(*keyDup)(<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">void<\/span>&nbsp;*privdata,&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">const<\/span>&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">void<\/span>&nbsp;*key);\n&nbsp;<span class=\"hljs-comment\" style=\"color: #a0a1a7; font-style: italic; line-height: 26px;\">\/\/&nbsp;\u590d\u5236\u503c\u7684\u51fd\u6570<\/span>\n&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">void<\/span>&nbsp;*(*valDup)(<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">void<\/span>&nbsp;*privdata,&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">const<\/span>&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">void<\/span>&nbsp;*obj);\n&nbsp;<span class=\"hljs-comment\" style=\"color: #a0a1a7; font-style: italic; line-height: 26px;\">\/\/&nbsp;\u5bf9\u6bd4\u952e\u7684\u51fd\u6570<\/span>\n&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">int<\/span>&nbsp;(*keyCompare)(<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">void<\/span>&nbsp;*privdata,&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">const<\/span>&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">void<\/span>&nbsp;*key1,&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">const<\/span>&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">void<\/span>&nbsp;*key2);\n&nbsp;<span class=\"hljs-comment\" style=\"color: #a0a1a7; font-style: italic; line-height: 26px;\">\/\/&nbsp;\u9500\u6bc1\u952e\u7684\u51fd\u6570<\/span>\n&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">void<\/span>&nbsp;(*valDestructor)(<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">void<\/span>&nbsp;*privdata,&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">void<\/span>&nbsp;*obj);\n}&nbsp;dictType;\n<\/code><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;\"><code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">ht<\/code> \u6570\u7ec4\u8868\u793a\u5b58\u50a8\u4e24\u4e2a\u54c8\u5e0c\u8868\uff0c\u5e73\u5e38\u60c5\u51b5\u4e0b\u53ea\u4f7f\u7528 <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">ht[0]<\/code> \uff0c\u53ea\u6709\u5728 <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">rehash<\/code> \u65f6\u624d\u4f1a\u4f7f\u7528\u5230 <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">h[1]<\/code> \u548c <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">trehashids<\/code>\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;\"><strong style=\"font-weight: bold; color: black;\">\u5b57\u5178\u7684\u7ed3\u6784\u5c31\u662f\uff0c\u4e00\u4e2a\u5b57\u5178\u4e2d\u6709\u4e24\u4e2a\u54c8\u5e0c\u8868\uff0c\u5e73\u65f6\u53ea\u7528\u4e00\u4e2a\u54c8\u5e0c\u8868\u3002\u53e6\u4e00\u4e2a\u54c8\u5e0c\u8868\u5728 rehash \u7684\u65f6\u5019\u4f7f\u7528\u3002\u6bcf\u4e2a\u54c8\u5e0c\u8868\u4e2d\u5b58\u5728\u4e00\u4e2a\u8282\u70b9\u6570\u7ec4\uff0c\u8282\u70b9\u5219\u7528\u4e8e\u5b58\u653e\u952e\u503c\u5bf9\u3002<\/strong><\/p>\n<h3 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;\"><span class=\"prefix\" style=\"display: none;\"><\/span><span class=\"content\">\u65b0\u589e\u952e\u503c\u5bf9<\/span><span class=\"suffix\" style=\"display: none;\"><\/span><\/h3>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;\">\u65b0\u589e\u952e\u503c\u5bf9\u5c31\u610f\u5473\u7740\u9700\u8981\u8ba1\u7b97\u952e\u7684<strong style=\"font-weight: bold; color: black;\">\u54c8\u5e0c\u503c<\/strong>\uff0c\u4ece\u800c\u5f97\u51fa<strong style=\"font-weight: bold; color: black;\">\u7d22\u5f15\u503c<\/strong>\u3002\u6839\u636e\u7d22\u5f15\u503c\u5c06\u952e\u503c\u5bf9\u7684\u54c8\u5e0c\u8282\u70b9\u653e\u5230\u54c8\u5e0c\u8868\u7684\u6307\u5b9a\u4f4d\u7f6e\u4e0a\u3002\u8ba1\u7b97\u54c8\u5e0c\u503c\u4f7f\u7528\u7684\u662f\u5b57\u5178\u7ed3\u6784\u4f53\u4e2d\u7684 <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">type<\/code> \u4e2d\u7684\u51fd\u6570\uff0c\u5373 <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">hash = dict-&gt;type-&gt;hashFunction(key)<\/code> \u3002\u8ba1\u7b97\u7d22\u5f15\u503c\u5219\u662f <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">index = hash &amp; dict-&gt;ht[x].sizemask<\/code> \uff0cx \u53d6\u51b3\u4e8e\u5f53\u524d\u4f7f\u7528\u7684\u662fht[1]\u8fd8\u662fht[2]\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;\">\u4e0d\u8fc7\uff0c\u603b\u4f1a\u6709\u4e0d\u540c\u7684\u952e\u5bf9\u5e94\u76f8\u540c\u7684\u7d22\u5f15\u503c\uff0c\u4ea7\u751f\u51b2\u7a81\u3002Redis \u4e2d\u4f7f\u7528\u4e86\u5e38\u7528\u7684\u201c\u94fe\u5730\u5740\u6cd5\u201d\u6765\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u5f53\u51fa\u73b0\u51b2\u7a81\u65f6\u5c31\u628a\u65b0\u8282\u70b9\u653e\u5230\u8868\u5934\u7684\u4f4d\u7f6e\u3002<\/p>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 22px;\"><span class=\"prefix\" style=\"display: none;\"><\/span><span class=\"content\">Rehash<\/span><span class=\"suffix\"><\/span><\/h2>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;\">\u968f\u7740\u5b57\u5178\u4e2d\u952e\u503c\u5bf9\u6570\u91cf\u7684\u4e0d\u65ad\u53d8\u5316\uff0c\u4e3a\u4e86\u4fdd\u8bc1\u54c8\u5e0c\u8868\u7684\u7a7a\u95f4\u5229\u7528\u7387\u4ee5\u53ca\u6548\u7387\uff0c\u5728\u54c8\u5e0c\u8868\u8fc7\u5927\u6216\u8005\u8fc7\u5c0f\u662f\u8981\u5bf9\u54c8\u5e0c\u8868\u5927\u5c0f\u8fdb\u884c\u8c03\u6574\u3002\u5982\u679c\u8fc7\u5c0f\uff0c\u5219\u4f1a\u4e0d\u65ad\u53d1\u751f\u952e\u51b2\u7a81\u5bfc\u81f4\u6548\u7387\u4f4e\u4e0b\uff0c\u5982\u679c\u8fc7\u5927\u5219\u4f1a\u6d6a\u8d39\u5b58\u50a8\u7a7a\u95f4\u3002\u6240\u4ee5\uff0c\u7ecf\u8fc7\u4e0d\u65ad\u8c03\u6574\u53ef\u4ee5\u4f7f\u5176\u7ef4\u6301\u5728\u4e00\u4e2a\u5408\u7406\u7684\u8303\u56f4\u3002<\/p>\n<h3 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;\"><span class=\"prefix\" style=\"display: none;\"><\/span><span class=\"content\">\u6b65\u9aa4<\/span><span class=\"suffix\" style=\"display: none;\"><\/span><\/h3>\n<ol data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 8px; margin-bottom: 8px; padding-left: 25px; color: black; list-style-type: decimal;\">\n<li>\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500;\">\u4e3a <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">ht[1]<\/code> \u5206\u914d\u7a7a\u95f4\uff0c\u5927\u5c0f\u53d6\u51b3\u4e8e\u662f\u6269\u5927\u54c8\u5e0c\u8868\u8fd8\u662f\u7f29\u5c0f\u54c8\u5e0c\u8868\u3002\u5982\u679c<strong style=\"font-weight: bold; color: black;\">\u6269\u5927<\/strong>\uff0c\u5176\u5927\u5c0f\u4e3a\u7b2c\u4e00\u4e2a\u5927\u4e8e\u7b49\u4e8e <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">ht[0].used * 2<\/code> \u4e14\u540c\u65f6\u4e3a<code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">2\u7684n\u6b21\u65b9\u5e42<\/code> \u7684\u503c\u3002\u5982\u679c<strong style=\"font-weight: bold; color: black;\">\u7f29\u5c0f<\/strong>\uff0c\u5176\u5927\u5c0f\u4e3a\u7b2c\u4e00\u4e2a\u5927\u4e8e\u7b49\u4e8e <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">ht[0].used<\/code> \u5176\u540c\u65f6\u4e3a <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">2\u7684n\u6b21\u65b9\u5e42<\/code> \u7684\u503c\u3002<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500;\">\u5c06\u4fdd\u5b58\u5728 <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">ht[0]<\/code> \u4e2d\u6240\u6709\u7684\u952e\u503c\u5bf9\u91cd\u65b0\u8ba1\u7b97\u54c8\u5e0c\u503c\u548c\u7d22\u5f15\u503c\u540e\uff0c\u5b58\u653e\u5728 <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">ht[1]<\/code> \u4e2d\u3002<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500;\">\u5f53\u8fc1\u79fb\u5b8c\u6240\u6709\u7684\u952e\u503c\u4e4b\u540e\uff0c\u91ca\u653e\u539f <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">ht[0]<\/code> \u7684\u7a7a\u95f4\uff0c\u5c06\u539f <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">h[1]<\/code> \u6539\u4e3a <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">h0<\/code>, \u5e76\u5728 <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">ht[1]<\/code> \u65b0\u521b\u5efa\u4e00\u4e2a\u7a7a\u767d\u54c8\u5e0c\u8868\u3002<\/section>\n<\/li>\n<\/ol>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;\"><strong style=\"font-weight: bold; color: black;\">\u90a3\u4e48\u4f55\u65f6\u6269\u5c55\u54c8\u5e0c\u8868\u5927\u5c0f\u5462\uff1f<\/strong> \u4e00\u662f\u5f53\u6ca1\u6709\u5728\u6267\u884c <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">BGSAVE<\/code> \u6216\u8005 <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">BGREWRITEAOF<\/code> \u547d\u4ee4\u65f6\uff0c\u5e76\u4e14\u54c8\u5e0c\u8868\u7684\u8d1f\u8f7d\u56e0\u5b50\u5927\u4e8e\u7b49\u4e8e1\u65f6\u3002  \u4e8c\u662f\u5f53\u5728\u6267\u884c\u8fd9\u4fe9\u547d\u4ee4\uff0c\u4f46\u662f\u8d1f\u8f7d\u56e0\u5b50\u5927\u4e8e\u7b49\u4e8e5\u65f6\uff08\u8282\u7ea6\u5185\u5b58\uff0c\u4e0a\u8ff0\u4e24\u547d\u4ee4\u6d88\u8017\u5185\u5b58\uff09\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;\">\u8d1f\u8f7d\u56e0\u5b50\u8ba1\u7b97\u516c\u5f0f\u4e3a\uff1a\u8d1f\u8f7d\u56e0\u5b50 = \u54c8\u5e0c\u8868\u4fdd\u5b58\u8282\u70b9\u6570\u91cf\uff0f\u54c8\u5e0c\u8868\u5927\u5c0f<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;\"><strong style=\"font-weight: bold; color: black;\">\u90a3\u4e48\u4f55\u65f6\u7f29\u5c0f\u54c8\u5e0c\u8868\u5927\u5c0f\u5462\uff1f<\/strong> \u5f53\u54c8\u5e0c\u8868\u8d1f\u8f7d\u56e0\u5b50\u5c0f\u4e8e 0.1 \u65f6\u5219\u4f1a\u8fdb\u884c\u7f29\u5c0f\u3002<\/p>\n<h3 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;\"><span class=\"prefix\" style=\"display: none;\"><\/span><span class=\"content\">\u6e10\u8fdb\u5f0f Rehash<\/span><span class=\"suffix\" style=\"display: none;\"><\/span><\/h3>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;\">\u5176\u5b9e\u5bf9\u4e8e\u4e0a\u8ff0<strong style=\"font-weight: bold; color: black;\">\u6b65\u9aa4<\/strong> 2 \uff0c\u666e\u901a\u4eba\u89c9\u5f97\u8fd9\u4e0d\u5c31\u662f\u628a\u952e\u503c\u5bf9\u91cd\u65b0\u5206\u914d\u4e00\u4e0b\u5417\uff1f\u4f46\u662f\u5982\u679c\u6b64\u65f6\u5b58\u5728\u767e\u4e07\u3001\u5343\u4e07\u751a\u81f3\u4ebf\u7ea7\u7684\u952e\u503c\u5bf9\u65f6\uff0c\u6050\u6015\u5c31\u662f\u4e0d\u662f\u4e00\u7728\u773c\u7684\u529f\u592b\u5c31\u53ef\u4ee5\u5b8c\u6210\u7684\u4e86\u3002\u5982\u679c\u975e\u5f97\u4e00\u6b21\u6027\u5b8c\u6210\uff0c\u90a3\u4e48\u53ef\u80fd\u4f1a\u5bfc\u81f4\u670d\u52a1\u5668\u7684\u4e0d\u53ef\u7528\u3002\u6240\u4ee5\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0cRedis \u91c7\u7528\u4e86\u6162\u6162\u6765\u7684\u529e\u6cd5<strong style=\"font-weight: bold; color: black;\">\u6e10\u8fdb\u5f0f Rehash<\/strong>\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;\">\u5176\u4e3b\u8981\u6b65\u9aa4\u4e0e\u524d\u9762\u7684\u6709\u4e9b\u76f8\u4f3c\uff0c\u53ea\u4e0d\u8fc7\u5728\u6e10\u8fdb\u5f0fRehash\u4e2d\u4f7f\u7528\u5230\u4e86 <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">dict-&gt;trehashids<\/code> \u503c\u6765\u8bb0\u5f55\u5f53\u524drehash\u5230\u4e86\u54ea\u4e2a\u7d22\u5f15\u3002\u5728 Rehash \u671f\u95f4\uff0c\u53ef\u4ee5\u5bf9\u5b57\u5178\u6b63\u5e38\u8fdb\u884c\u589e\u52a0\u3001\u5220\u9664\u3001\u67e5\u627e\u548c\u66f4\u65b0\u3002\u7136\u540e\u540c\u65f6\u4e5f\u4f1a\u5c06  <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">trehashids<\/code> \u4e0a\u8bb0\u5f55\u7684\u7d22\u5f15\u503c\u4e0a\u7684\u8282\u70b9\u8fc1\u79fb\u5230 <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">h[1]<\/code> \u4e0a\u3002\u5e76\u4e14\u6240\u6709\u7684\u65b0\u589e\u8282\u70b9\u90fd\u4f1a\u653e\u5230 <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">h[1]<\/code>\u4e2d\uff0c\u8fd9\u6837\u5c31\u4f1a\u5bfc\u81f4 <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">h[0]<\/code> \u4e2d\u7684\u8282\u70b9\u8d8a\u6765\u8d8a\u5c11\uff0c\u6700\u7ec8\u5b8c\u6210 rehash\u3002\u5176\u5b83\u7684\u64cd\u4f5c\u5219\u4f1a\u5728\u4e24\u4e2a\u8868\u4e0a\u8fdb\u884c\u3002<\/p>\n<\/section>\n","protected":false},"excerpt":{"rendered":"<p>\u7b80\u4ecb \u5b57\u5178\u662f\u4e00\u79cd\u5728 Redis \u4e2d\u9ad8\u9891\u4f7f\u7528\u7684\u7528\u4e8e\u4fdd\u5b58\u952e\u503c\u5bf9\u7684\u62bd\u8c61\u6570\u636e\u7ed3\u6784\uff0c\u5728 Java \u4e2d\u5e38\u7528\u7684\u6709 HasmM &hellip; <a href=\"https:\/\/www.changxuan.top\/?p=1122\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">Redis\u4e2d\u7684\u5b57\u5178<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[37],"tags":[88],"class_list":["post-1122","post","type-post","status-publish","format-standard","hentry","category-tech","tag-redis"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Redis\u4e2d\u7684\u5b57\u5178 - \u5e38\u8f69<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.changxuan.top\/?p=1122\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Redis\u4e2d\u7684\u5b57\u5178 - \u5e38\u8f69\" \/>\n<meta property=\"og:description\" content=\"\u7b80\u4ecb \u5b57\u5178\u662f\u4e00\u79cd\u5728 Redis \u4e2d\u9ad8\u9891\u4f7f\u7528\u7684\u7528\u4e8e\u4fdd\u5b58\u952e\u503c\u5bf9\u7684\u62bd\u8c61\u6570\u636e\u7ed3\u6784\uff0c\u5728 Java \u4e2d\u5e38\u7528\u7684\u6709 HasmM &hellip; \u7ee7\u7eed\u9605\u8bfbRedis\u4e2d\u7684\u5b57\u5178\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.changxuan.top\/?p=1122\" \/>\n<meta property=\"og:site_name\" content=\"\u5e38\u8f69\" \/>\n<meta property=\"article:published_time\" content=\"2020-10-14T15:54:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-12-19T07:39:13+00:00\" \/>\n<meta name=\"author\" content=\"\u5e38\u8f69\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u5e38\u8f69\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.changxuan.top\\\/?p=1122#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.changxuan.top\\\/?p=1122\"},\"author\":{\"name\":\"\u5e38\u8f69\",\"@id\":\"https:\\\/\\\/www.changxuan.top\\\/#\\\/schema\\\/person\\\/08c8f0af44536928094dc1b4f88da3bd\"},\"headline\":\"Redis\u4e2d\u7684\u5b57\u5178\",\"datePublished\":\"2020-10-14T15:54:55+00:00\",\"dateModified\":\"2020-12-19T07:39:13+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.changxuan.top\\\/?p=1122\"},\"wordCount\":23,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.changxuan.top\\\/#\\\/schema\\\/person\\\/08c8f0af44536928094dc1b4f88da3bd\"},\"keywords\":[\"Redis\"],\"articleSection\":[\"\u6280\u672f\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.changxuan.top\\\/?p=1122#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.changxuan.top\\\/?p=1122\",\"url\":\"https:\\\/\\\/www.changxuan.top\\\/?p=1122\",\"name\":\"Redis\u4e2d\u7684\u5b57\u5178 - \u5e38\u8f69\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.changxuan.top\\\/#website\"},\"datePublished\":\"2020-10-14T15:54:55+00:00\",\"dateModified\":\"2020-12-19T07:39:13+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.changxuan.top\\\/?p=1122#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.changxuan.top\\\/?p=1122\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.changxuan.top\\\/?p=1122#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\\\/\\\/www.changxuan.top\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Redis\u4e2d\u7684\u5b57\u5178\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.changxuan.top\\\/#website\",\"url\":\"https:\\\/\\\/www.changxuan.top\\\/\",\"name\":\"\u5e38\u8f69\",\"description\":\"\u95fb\u9053\u6709\u5148\u540e\uff0c\u672f\u4e1a\u6709\u4e13\u653b-\u4e00\u4e8c\u4e09\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.changxuan.top\\\/#\\\/schema\\\/person\\\/08c8f0af44536928094dc1b4f88da3bd\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.changxuan.top\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.changxuan.top\\\/#\\\/schema\\\/person\\\/08c8f0af44536928094dc1b4f88da3bd\",\"name\":\"\u5e38\u8f69\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\\\/\\\/www.changxuan.top\\\/wp-content\\\/uploads\\\/2021\\\/04\\\/IMG_008520200606-095631.jpg\",\"url\":\"https:\\\/\\\/www.changxuan.top\\\/wp-content\\\/uploads\\\/2021\\\/04\\\/IMG_008520200606-095631.jpg\",\"contentUrl\":\"https:\\\/\\\/www.changxuan.top\\\/wp-content\\\/uploads\\\/2021\\\/04\\\/IMG_008520200606-095631.jpg\",\"width\":960,\"height\":960,\"caption\":\"\u5e38\u8f69\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.changxuan.top\\\/wp-content\\\/uploads\\\/2021\\\/04\\\/IMG_008520200606-095631.jpg\"},\"description\":\"\u603b\u8981\u505a\u70b9\u4ec0\u4e48\u5427\uff01\",\"sameAs\":[\"https:\\\/\\\/www.changxuan.top\"],\"url\":\"https:\\\/\\\/www.changxuan.top\\\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Redis\u4e2d\u7684\u5b57\u5178 - \u5e38\u8f69","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.changxuan.top\/?p=1122","og_locale":"zh_CN","og_type":"article","og_title":"Redis\u4e2d\u7684\u5b57\u5178 - \u5e38\u8f69","og_description":"\u7b80\u4ecb \u5b57\u5178\u662f\u4e00\u79cd\u5728 Redis \u4e2d\u9ad8\u9891\u4f7f\u7528\u7684\u7528\u4e8e\u4fdd\u5b58\u952e\u503c\u5bf9\u7684\u62bd\u8c61\u6570\u636e\u7ed3\u6784\uff0c\u5728 Java \u4e2d\u5e38\u7528\u7684\u6709 HasmM &hellip; \u7ee7\u7eed\u9605\u8bfbRedis\u4e2d\u7684\u5b57\u5178","og_url":"https:\/\/www.changxuan.top\/?p=1122","og_site_name":"\u5e38\u8f69","article_published_time":"2020-10-14T15:54:55+00:00","article_modified_time":"2020-12-19T07:39:13+00:00","author":"\u5e38\u8f69","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u5e38\u8f69","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.changxuan.top\/?p=1122#article","isPartOf":{"@id":"https:\/\/www.changxuan.top\/?p=1122"},"author":{"name":"\u5e38\u8f69","@id":"https:\/\/www.changxuan.top\/#\/schema\/person\/08c8f0af44536928094dc1b4f88da3bd"},"headline":"Redis\u4e2d\u7684\u5b57\u5178","datePublished":"2020-10-14T15:54:55+00:00","dateModified":"2020-12-19T07:39:13+00:00","mainEntityOfPage":{"@id":"https:\/\/www.changxuan.top\/?p=1122"},"wordCount":23,"commentCount":0,"publisher":{"@id":"https:\/\/www.changxuan.top\/#\/schema\/person\/08c8f0af44536928094dc1b4f88da3bd"},"keywords":["Redis"],"articleSection":["\u6280\u672f"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.changxuan.top\/?p=1122#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.changxuan.top\/?p=1122","url":"https:\/\/www.changxuan.top\/?p=1122","name":"Redis\u4e2d\u7684\u5b57\u5178 - \u5e38\u8f69","isPartOf":{"@id":"https:\/\/www.changxuan.top\/#website"},"datePublished":"2020-10-14T15:54:55+00:00","dateModified":"2020-12-19T07:39:13+00:00","breadcrumb":{"@id":"https:\/\/www.changxuan.top\/?p=1122#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.changxuan.top\/?p=1122"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.changxuan.top\/?p=1122#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.changxuan.top\/"},{"@type":"ListItem","position":2,"name":"Redis\u4e2d\u7684\u5b57\u5178"}]},{"@type":"WebSite","@id":"https:\/\/www.changxuan.top\/#website","url":"https:\/\/www.changxuan.top\/","name":"\u5e38\u8f69","description":"\u95fb\u9053\u6709\u5148\u540e\uff0c\u672f\u4e1a\u6709\u4e13\u653b-\u4e00\u4e8c\u4e09","publisher":{"@id":"https:\/\/www.changxuan.top\/#\/schema\/person\/08c8f0af44536928094dc1b4f88da3bd"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.changxuan.top\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":["Person","Organization"],"@id":"https:\/\/www.changxuan.top\/#\/schema\/person\/08c8f0af44536928094dc1b4f88da3bd","name":"\u5e38\u8f69","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.changxuan.top\/wp-content\/uploads\/2021\/04\/IMG_008520200606-095631.jpg","url":"https:\/\/www.changxuan.top\/wp-content\/uploads\/2021\/04\/IMG_008520200606-095631.jpg","contentUrl":"https:\/\/www.changxuan.top\/wp-content\/uploads\/2021\/04\/IMG_008520200606-095631.jpg","width":960,"height":960,"caption":"\u5e38\u8f69"},"logo":{"@id":"https:\/\/www.changxuan.top\/wp-content\/uploads\/2021\/04\/IMG_008520200606-095631.jpg"},"description":"\u603b\u8981\u505a\u70b9\u4ec0\u4e48\u5427\uff01","sameAs":["https:\/\/www.changxuan.top"],"url":"https:\/\/www.changxuan.top\/?author=1"}]}},"views":1383,"_links":{"self":[{"href":"https:\/\/www.changxuan.top\/index.php?rest_route=\/wp\/v2\/posts\/1122","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.changxuan.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.changxuan.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.changxuan.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.changxuan.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1122"}],"version-history":[{"count":3,"href":"https:\/\/www.changxuan.top\/index.php?rest_route=\/wp\/v2\/posts\/1122\/revisions"}],"predecessor-version":[{"id":1195,"href":"https:\/\/www.changxuan.top\/index.php?rest_route=\/wp\/v2\/posts\/1122\/revisions\/1195"}],"wp:attachment":[{"href":"https:\/\/www.changxuan.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.changxuan.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1122"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.changxuan.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}