{"id":201671,"date":"2025-05-10T08:44:35","date_gmt":"2025-05-10T00:44:35","guid":{"rendered":"https:\/\/server.hk\/cnblog\/201671\/"},"modified":"2025-05-10T08:44:35","modified_gmt":"2025-05-10T00:44:35","slug":"redis%e5%b8%83%e9%9a%86%e8%bf%87%e6%bb%a4%e5%99%a8%e7%9a%84%e5%8e%9f%e7%90%86%e5%92%8c%e5%ba%94%e7%94%a8%e5%9c%ba%e6%99%af%ef%bc%8c%e8%a7%a3%e5%86%b3%e7%bc%93%e5%ad%98%e7%a9%bf%e9%80%8f","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/201671\/","title":{"rendered":"Redis\u5e03\u9686\u8fc7\u6ee4\u5668\u7684\u539f\u7406\u548c\u5e94\u7528\u573a\u666f\uff0c\u89e3\u51b3\u7f13\u5b58\u7a7f\u900f"},"content":{"rendered":"<p><b><\/b> <\/p>\n<h1>Redis\u5e03\u9686\u8fc7\u6ee4\u5668\u7684\u539f\u7406\u548c\u5e94\u7528\u573a\u666f\uff0c\u89e3\u51b3\u7f13\u5b58\u7a7f\u900f<\/h1>\n<p><span style=\"cursor: pointer\"><i><\/i>\u6536\u85cf<\/span> <\/p>\n<p>\u5bf9\u4e8e\u4e00\u4e2a\u6570\u636e\u5e93\u5f00\u53d1\u8005\u6765\u8bf4\uff0c\u7262\u56fa\u624e\u5b9e\u7684\u57fa\u7840\u662f\u5341\u5206\u91cd\u8981\u7684\uff0cgolang\u5b66\u4e60\u7f51\u5c31\u6765\u5e26\u5927\u5bb6\u4e00\u70b9\u70b9\u7684\u638c\u63e1\u57fa\u7840\u77e5\u8bc6\u70b9\u3002\u4eca\u5929\u672c\u7bc7\u6587\u7ae0\u5e26\u5927\u5bb6\u4e86\u89e3\u300aRedis\u5e03\u9686\u8fc7\u6ee4\u5668\u7684\u539f\u7406\u548c\u5e94\u7528\u573a\u666f\uff0c\u89e3\u51b3\u7f13\u5b58\u7a7f\u900f\u300b\uff0c\u4e3b\u8981\u4ecb\u7ecd\u4e86\u5e03\u9686\u8fc7\u6ee4\u5668\u3001Redis\uff0c\u5e0c\u671b\u5bf9\u5927\u5bb6\u7684\u77e5\u8bc6\u79ef\u7d2f\u6709\u6240\u5e2e\u52a9\uff0c\u5feb\u70b9\u6536\u85cf\u8d77\u6765\u5427\uff0c\u5426\u5219\u9700\u8981\u65f6\u5c31\u627e\u4e0d\u5230\u4e86\uff01<\/p>\n<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20230429\/1682761902644ce8ae182b8.png\" style=\"max-width:100%\" class=\"aligncenter\"> <\/p>\n<p>\u4eca\u5929\u5206\u4eab\u4e00\u4e0bRedis\u5e03\u9686\u8fc7\u6ee4\u5668\u7684\u539f\u7406\u548c\u5e94\u7528\u573a\u666f\uff0c\u89e3\u51b3\u7f13\u5b58\u7a7f\u900f\uff0c\u5b9e\u73b0\u5feb\u901f\u5165\u95e8\uff0c\u4e30\u5bcc\u4e2a\u4eba\u7b80\u5386\uff0c\u63d0\u9ad8\u9762\u8bd5level\uff0c\u7ed9\u81ea\u5df1\u589e\u52a0\u4e00\u70b9\u8c08\u8d44\uff0c\u79d2\u53d8\u9762\u8bd5\u5c0f\u8fbe\u4eba\uff0cBAT\u4e0d\u662f\u68a6\u3002<\/p>\n<h2><span style=\"color: #515151\">\u4e00\u3001\u5e03\u9686\u8fc7\u6ee4\u5668BloomFilter\u662f\u4ec0\u4e48<\/span><\/h2>\n<p>\u5e03\u9686\u8fc7\u6ee4\u5668BloomFilter\u662f\u4e00\u79cd\u4e13\u95e8\u7528\u6765\u89e3\u51b3\u53bb\u91cd\u95ee\u9898\u7684\u9ad8\u7ea7\u6570\u636e\u7ed3\u679c\u3002<\/p>\n<p>\u5b9e\u8d28\u5c31\u662f\u4e00\u4e2a\u5927\u578b\u4f4d\u6570\u7ec4\u548c\u51e0\u4e2a\u4e0d\u540c\u7684\u65e0\u504fhash\u51fd\u6570\uff0c\u65e0\u504f\u8868\u793a\u5206\u5e03\u5747\u5300\u3002\u7531\u4e00\u4e2a\u521d\u503c\u4e3a\u96f6\u7684bit\u6570\u7ec4\u548c\u591a\u4e2a\u54c8\u5e0c\u51fd\u6570\u7ec4\u6210\uff0c\u7528\u6765\u5224\u65ad\u67d0\u4e2a\u6570\u636e\u662f\u5426\u5b58\u5728\uff0c\u5b83\u548cHyperLogLog\u4e00\u6837\uff0c\u4e0d\u662f\u90a3\u4e48\u7684\u7cbe\u51c6\uff0c\u5b58\u5728\u4e00\u5b9a\u7684\u8bef\u5224\u6982\u7387\u3002<\/p>\n<h2><span style=\"color: #515151\">\u4e8c\u3001\u5e03\u9686\u8fc7\u6ee4\u5668BloomFilter\u80fd\u5e72\u561b\uff1f<\/span><\/h2>\n<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20230429\/1682761902644ce8ae6d69c.png\" style=\"max-width:100%\" class=\"aligncenter\"> <\/p>\n<p>\u9ad8\u6548\u5730\u63d2\u5165\u548c\u67e5\u8be2\uff0c\u5360\u7528\u7a7a\u95f4\u5c11\uff0c\u8fd4\u56de\u7684\u7ed3\u679c\u662f\u4e0d\u786e\u5b9a\u7684\uff0c\u4e00\u4e2a\u5143\u7d20\u5982\u679c\u5224\u65ad\u7ed3\u679c\u4e3a\u5b58\u5728\uff0c\u5b83\u4e0d\u4e00\u5b9a\u5b58\u5728\uff1b\u4e0d\u5b58\u5728\u65f6\uff0c\u4e00\u5b9a\u4e0d\u5b58\u5728\u3002<\/p>\n<p>\u56e0\u4e3a\u4e0d\u540c\u7684\u5b57\u7b26\u4e32\u7684hashcode\u53ef\u80fd\u76f8\u540c\uff0c\u5e03\u9686\u8fc7\u6ee4\u5668BloomFilter\u662f\u6839\u636ehashcode\u5224\u65ad\u7684\uff0c\u5982\u679c\u67d0\u4e2ahashcode\u5b58\u5728\uff0c\u5b83\u5bf9\u5e94\u7684\u5b57\u7b26\u4e32\u4e0d\u4e00\u5b9a\u662f\u4f60\u60f3\u8981\u7684\u90a3\u4e2a\u5b57\u7b26\u4e32\uff1b\u4f46\u662f\uff0chashcode\u4e0d\u5b58\u5728\u65f6\uff0c\u4f60\u6240\u8981\u7684\u5b57\u7b26\u4e32\uff0c\u80af\u5b9a\u4e0d\u5b58\u5728\uff0c\u7ec6\u54c1~<\/p>\n<p>\u5e03\u9686\u8fc7\u6ee4\u5668BloomFilter\u53ea\u80fd\u6dfb\u52a0\u5143\u7d20\uff0c\u4e0d\u80fd\u5220\u9664\u5143\u7d20\u3002<\/p>\n<p>\u8fd9\u548c\u4e0a\u9762\u63d0\u5230\u7684hashcode\u5224\u5b9a\u539f\u7406\u662f\u4e00\u6837\u7684\uff0c\u76f8\u540chashcode\u7684\u5b57\u7b26\u4e32\u4f1a\u5b58\u50a8\u5728\u4e00\u4e2aindex\uff0c\u5220\u9664\u65f6\uff0c\u662f\u5c06\u67d0\u4e2aindex\u79fb\u9664\uff0c\u6b64\u65f6\uff0c\u5c31\u53ef\u80fd\u79fb\u9664\u62e5\u6709\u76f8\u540chashcode\u7684\u4e0d\u540c\u5b57\u7b26\u4e32\uff0c\u7ec6\u54c1~<\/p>\n<h2><span style=\"color: #515151\">\u4e09\u3001\u5e03\u9686\u8fc7\u6ee4\u5668\u4f7f\u7528\u573a\u666f<\/span><\/h2>\n<h3><span style=\"color: #515151\">1\u3001\u89e3\u51b3\u7f13\u5b58\u7a7f\u900f\u95ee\u9898<\/span><\/h3>\n<p>\u4e00\u822c\u60c5\u51b5\u4e0b\uff0c\u5148\u67e5\u8be2Redis\u7f13\u5b58\uff0c\u5982\u679cRedis\u4e2d\u6ca1\u6709\uff0c\u518d\u67e5\u8be2MySQL\u3002\u5f53\u6570\u636e\u5e93\u4e2d\u4e5f\u4e0d\u5b58\u5728\u8fd9\u6761\u6570\u636e\u65f6\uff0c\u6bcf\u6b21\u67e5\u8be2\u90fd\u8981\u8bbf\u95ee\u6570\u636e\u5e93\uff0c\u8fd9\u5c31\u662f\u7f13\u5b58\u7a7f\u900f\u3002<\/p>\n<p>\u5728Redis\u524d\u9762\u6dfb\u52a0\u4e00\u5c42\u5e03\u9686\u8fc7\u6ee4\u5668\uff0c\u8bf7\u6c42\u5148\u5728\u5e03\u9686\u8fc7\u6ee4\u5668\u4e2d\u5224\u65ad\uff0c\u5982\u679c\u5e03\u9686\u8fc7\u6ee4\u5668\u4e0d\u5b58\u5728\u65f6\uff0c\u76f4\u63a5\u8fd4\u56de\uff0c\u4e0d\u518d\u53cd\u95eeRedis\u548cMySQL\u3002<\/p>\n<p>\u5982\u679c\u5e03\u9686\u8fc7\u6ee4\u5668\u4e2d\u5b58\u5728\u65f6\uff0c\u518d\u8bbf\u95eeRedis\uff0c\u518d\u8bbf\u95ee\u6570\u636e\u5e93\u3002<\/p>\n<p>\u5b8c\u7f8e\u89e3\u51b3\u7f13\u5b58\u7a7f\u900f\u95ee\u9898\u3002<\/p>\n<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20230429\/1682761902644ce8aec5ecd.png\" style=\"max-width:100%\" class=\"aligncenter\"> <\/p>\n<h3><span style=\"color: #515151\">2\u3001\u9ed1\u540d\u5355<\/span><\/h3>\n<p>\u5982\u679c\u9ed1\u540d\u5355\u975e\u5e38\u5927\uff0c\u4e0a\u5343\u4e07\u4e86\uff0c\u5b58\u653e\u8d77\u6765\u5f88\u8017\u8d39\u7a7a\u95f4\uff0c\u5728\u5e03\u9686\u8fc7\u6ee4\u5668\u4e2d\u5b9e\u73b0\u9ed1\u540d\u5355\u529f\u80fd\uff0c\u662f\u4e00\u4e2a\u5f88\u597d\u7684\u9009\u62e9\u3002<\/p>\n<h3><span style=\"color: #515151\">3\u3001\u7f51\u9875\u722c\u866b\u5bf9URL\u7684\u53bb\u91cd\uff0c\u907f\u514d\u722c\u53d6\u76f8\u540c\u7684URL\u5730\u5740<\/span><\/h3>\n<h2><span style=\"color: #515151\">\u56db\u3001\u64cd\u4f5c\u5e03\u9686\u8fc7\u6ee4\u5668BloomFilter<\/span><\/h2>\n<h3><span style=\"color: #515151\">1\u3001\u4f7f\u7528\u5e03\u9686\u8fc7\u6ee4\u5668<\/span><\/h3>\n<h4>\uff081\uff09\u521d\u59cb\u5316bitmap<\/h4>\n<p>\u5e03\u9686\u8fc7\u6ee4\u5668 \u672c\u8d28\u4e0a \u662f\u7531\u957f\u5ea6\u4e3a m \u7684\u4f4d\u5411\u91cf\u6216\u4f4d\u5217\u8868\uff08\u4ec5\u5305\u542b 0 \u6216 1 \u4f4d\u503c\u7684\u5217\u8868\uff09\u7ec4\u6210\uff0c\u6700\u521d\u6240\u6709\u7684\u503c\u5747\u8bbe\u7f6e\u4e3a 0\u3002<\/p>\n<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20230429\/1682761903644ce8af173ac.png\" style=\"max-width:100%\" class=\"aligncenter\"> <\/p>\n<h4>\uff082\uff09\u6dfb\u52a0key<\/h4>\n<p>\u4f7f\u7528\u591a\u4e2ahash\u51fd\u6570\u5bf9key\u8fdb\u884chash\u8fd0\u7b97\uff0c\u5f97\u5230\u4e00\u4e2a\u6574\u6570\u7d22\u5f15\u503c\uff0c\u5bf9\u4f4d\u6570\u7ec4\u957f\u5ea6\u8fdb\u884c\u53d6\u6a21\u8fd0\u7b97\u5f97\u5230\u4e00\u4e2a\u4f4d\u7f6e\uff0c\u6bcf\u4e2ahash\u51fd\u6570\u90fd\u4f1a\u5f97\u5230\u4e00\u4e2a\u4e0d\u540c\u7684\u4f4d\u7f6e\uff0c\u5c06\u8fd9\u51e0\u4e2a\u4f4d\u7f6e\u7684\u503c\u7f6e\u4e3a1\u5c31\u8868\u793a\u6dfb\u52a0\u6210\u529f\u3002<\/p>\n<p>\u4f8b\u5982\uff0c\u6211\u4eec\u6dfb\u52a0\u4e00\u4e2a\u5b57\u7b26\u4e32\u201c\u54ea\u5412\u7f16\u7a0b\u201d\uff0c\u5bf9\u5b57\u7b26\u4e32\u8fdb\u884c\u591a\u6b21hash(key) \u2192 \u53d6\u6a21\u8fd0\u884c\u2192 \u5f97\u5230\u5751\u4f4d\u3002<\/p>\n<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20230429\/1682761903644ce8af61887.png\" style=\"max-width:100%\" class=\"aligncenter\"> <\/p>\n<h3><span style=\"color: #515151\">2\u3001\u5220\u9664key<\/span><\/h3>\n<p>\u53ea\u8981\u6709\u5176\u4e2d\u4e00\u4f4d\u662f\u96f6\u5c31\u8868\u793a\u8fd9\u4e2akey\u4e0d\u5b58\u5728\uff0c\u4f46\u5982\u679c\u90fd\u662f1\uff0c\u5219\u4e0d\u4e00\u5b9a\u5b58\u5728\u5bf9\u5e94\u7684key\u3002<\/p>\n<h3><span style=\"color: #515151\">3\u3001\u5224\u65ad\u662f\u5426\u5b58\u5728<\/span><\/h3>\n<p>\u5411\u5e03\u9686\u8fc7\u6ee4\u5668\u67e5\u8be2\u67d0\u4e2akey\u662f\u5426\u5b58\u5728\u65f6\uff0c\u5148\u628a\u8fd9\u4e2a key \u901a\u8fc7\u76f8\u540c\u7684\u591a\u4e2a hash \u51fd\u6570\u8fdb\u884c\u8fd0\u7b97\uff0c\u67e5\u770b\u5bf9\u5e94\u7684\u4f4d\u7f6e\u662f\u5426\u90fd\u4e3a 1\uff0c<\/p>\n<p>\u53ea\u8981\u6709\u4e00\u4e2a\u4f4d\u4e3a\u96f6\uff0c\u90a3\u4e48\u8bf4\u660e\u5e03\u9686\u8fc7\u6ee4\u5668\u4e2d\u8fd9\u4e2a key \u4e0d\u5b58\u5728\uff1b<\/p>\n<p>\u5982\u679c\u8fd9\u51e0\u4e2a\u4f4d\u7f6e\u5168\u90fd\u662f 1\uff0c\u90a3\u4e48\u8bf4\u660e\u6781\u6709\u53ef\u80fd\u5b58\u5728\uff1b<\/p>\n<p>\u56e0\u4e3a\u8fd9\u4e9b\u4f4d\u7f6e\u7684 1 \u53ef\u80fd\u662f\u56e0\u4e3a\u5176\u4ed6\u7684 key \u5b58\u5728\u5bfc\u81f4\u7684\uff0c\u4e5f\u5c31\u662f\u524d\u9762\u8bf4\u8fc7\u7684hash\u51b2\u7a81<\/p>\n<h2><span style=\"color: #515151\">\u4e94\u3001\u4ee3\u7801\u5b9e\u4f8b<\/span><\/h2>\n<h3><span style=\"color: #515151\">1\u3001\u4f7f\u7528Redis\u505a\u7f13\u5b58<\/span><\/h3>\n<p><code>public class StudentSerivce { public static final String CACHE_KEY = \"student:\"; @Resource private StudentMapper studentMapper; @Resource private RedisTemplate redisTemplate; public void addstudent(Student student){ int i = studentMapper.insertStudent(student); if(i &gt; 0) { \/\/\u5230\u6570\u636e\u5e93\u91cc\u9762\uff0c\u91cd\u65b0\u635e\u51fa\u65b0\u6570\u636e\u51fa\u6765\uff0c\u505a\u7f13\u5b58 student=studentMapper.selectByKey(student.getId()); \/\/\u7f13\u5b58key String key=CACHE_KEY+student.getId(); \/\/\u5f80mysql\u91cc\u9762\u63d2\u5165\u6210\u529f\u968f\u540e\u518d\u4ecemysql\u67e5\u8be2\u51fa\u6765\uff0c\u518d\u63d2\u5165redis redisTemplate.opsForValue().set(key,student); } } public Student findstudentById(Integer studentId){ Student student = null; String key=CACHE_KEY+studentId; \/\/ \u67e5\u8be2redis student = (Student) redisTemplate.opsForValue().get(key); \/\/ redis\u6ca1\u6709\uff0c\u67e5\u8be2mysql if(student==null){ \/\/ \u4ecemysql\u67e5\u51fa\u6765student student=studentMapper.selectByPrimaryKey(studentId); \/\/ mysql\u6709\uff0credis\u6ca1\u6709 if (student != null) { \/\/ mysql\u7684\u6570\u636e\u5199\u5165redis redisTemplate.opsForValue().set(key,student); } } return student; } }<\/code><\/p>\n<h3><span style=\"color: #515151\">2\u3001\u5e03\u9686\u8fc7\u6ee4\u5668<\/span><\/h3>\n<p><code>import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; \/** * \u5e03\u9686\u8fc7\u6ee4\u5668 -&gt; redis -&gt; mysql * @autor \u54ea\u5412\u7f16\u7a0b * @date 2023-04-17 *\/ @Service public class StudentServiceImpl implements StudentService { public static final String CACHE_KEY = \"student:\"; @Autowired private StudentMapper studentMapper; @Autowired private RedisTemplate redisTemplate; public void addstudent(student student){ int i = studentMapper.insertSelective(student); if(i &gt; 0) { \/\/\u5230\u6570\u636e\u5e93\u91cc\u9762\uff0c\u91cd\u65b0\u635e\u51fa\u65b0\u6570\u636e\u51fa\u6765\uff0c\u505a\u7f13\u5b58 student=studentMapper.selectByPrimaryKey(student.getId()); \/\/\u7f13\u5b58key String key=CACHE_KEY+student.getId(); \/\/\u5f80mysql\u91cc\u9762\u63d2\u5165\u6210\u529f\u968f\u540e\u518d\u4ecemysql\u67e5\u8be2\u51fa\u6765\uff0c\u518d\u63d2\u5165redis redisTemplate.opsForValue().set(key,student); } } public student findstudentById(Integer studentId){ student student = null; \/\/\u7f13\u5b58key\u7684\u540d\u79f0 String key=CACHE_KEY+studentId; \/\/ \u67e5\u8be2redis student = (student) redisTemplate.opsForValue().get(key); \/\/redis\u6ca1\u6709\uff0c\u67e5\u8be2mysql if(student==null) { student=studentMapper.selectByPrimaryKey(studentId); \/\/ mysql\u6709\uff0credis\u6ca1\u6709 if (student != null) { \/\/ \u628amysql\u635e\u5230\u7684\u6570\u636e\u5199\u5165redis redisTemplate.opsForValue().set(key,student); } } return student; } \/** * BloomFilter -&gt; redis -&gt; mysql * \u767d\u540d\u5355\uff1awhites *\/ public student findStudentByIdWithBloomFilter (Integer studentId) { student student = null; String key = CACHE_KEY + studentId; \/\/\u5e03\u9686\u8fc7\u6ee4\u5668\u6821\u9a8c\uff0c\u65e0\u662f\u7edd\u5bf9\u65e0\uff0c\u6709\u662f\u53ef\u80fd\u6709 if(!checkWithBloomFilter(\"whites\",key)) { log.info(\"\u767d\u540d\u5355\u65e0\u6b64\u987e\u5ba2\u4fe1\u606f:{}\",key); return null; } \/\/\u67e5\u8be2redis student = (Student) redisTemplate.opsForValue().get(key); \/\/redis\u6ca1\u6709\uff0c\u67e5\u8be2mysql if (student == null) { student = studentMapper.selectByPrimaryKey(studentId); \/\/ mysql\u6709\uff0credis\u6ca1\u6709 if (student != null) { \/\/ \u628amysql\u635e\u5230\u7684\u6570\u636e\u5199\u5165redis redisTemplate.opsForValue().set(key, student); } } return student; } \/** * \u67e5\u8be2\u5e03\u9686\u8fc7\u6ee4\u5668\u4e2d\u662f\u5426\u5b58\u5728 *\/ public boolean checkWithBloomFilter(String checkItem,String key) { int hashValue = Math.abs(key.hashCode()); long index = (long) (hashValue % Math.pow(2, 32)); return redisTemplate.opsForValue().getBit(checkItem, index); } }<\/code><\/p>\n<h2><span style=\"color: #515151\">\u516d\u3001\u603b\u7ed3<\/span><\/h2>\n<ol>\n<li>\u6709\uff0c\u662f\u53ef\u80fd\u6709\uff1b\u65e0\uff0c\u662f\u80af\u5b9a\u65e0\u3002<\/li>\n<li>\u4f7f\u7528\u65f6z\uff0c\u521d\u59cb\u5316\u503c\u5c3d\u53ef\u80fd\u6ee1\u8db3\u5b9e\u9645\u5143\u7d20\u957f\u5ea6\uff0c\u907f\u514d\u6269\u5bb9\u3002<\/li>\n<li>\u5f53\u5b9e\u9645\u5143\u7d20\u6570\u91cf\u8d85\u8fc7\u521d\u59cb\u957f\u5ea6\u65f6\uff0c\u5e94\u8be5\u5bf9\u5e03\u9686\u8fc7\u6ee4\u5668\u8fdb\u884c\u91cd\u5efa\uff0c\u518d\u5c06\u6240\u6709\u7684\u5386\u53f2\u5143\u7d20\u6279\u91cf\u6dfb\u52a0\u8fdb\u53bb\u3002<\/li>\n<\/ol>\n<p>\u672c\u6587\u8f6c\u8f7d\u81ea\u5fae\u4fe1\u516c\u4f17\u53f7\u300c\u54ea\u5412\u7f16\u7a0b\u300d\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u4e8c\u7ef4\u7801\u5173\u6ce8\u3002\u8f6c\u8f7d\u672c\u6587\u8bf7\u8054\u7cfb\u54ea\u5412\u7f16\u7a0b\u516c\u4f17\u53f7\u3002<\/p>\n<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20230429\/1682761903644ce8afbca60.png\" style=\"max-width:100%\" class=\"aligncenter\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Redis\u5e03\u9686\u8fc7\u6ee4\u5668\u7684\u539f\u7406\u548c\u5e94\u7528&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[101],"tags":[],"class_list":["post-201671","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/201671","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=201671"}],"version-history":[{"count":0,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/201671\/revisions"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=201671"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=201671"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=201671"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}