{"id":195,"date":"2026-07-26T21:17:48","date_gmt":"2026-07-26T13:17:48","guid":{"rendered":"https:\/\/fsdata.site\/?p=195"},"modified":"2026-07-26T22:30:35","modified_gmt":"2026-07-26T14:30:35","slug":"redis-cache-protection-breakthrough-penetration-avalanche-2","status":"publish","type":"post","link":"https:\/\/fsdata.site\/?p=195","title":{"rendered":"Redis \u7f13\u5b58\u4e09\u5927\u9632\u62a4\u7b56\u7565\uff1a\u51fb\u7a7f\u3001\u7a7f\u900f\u3001\u96ea\u5d29\u8be6\u89e3"},"content":{"rendered":"<h2>\u7f13\u5b58\u5728\u751f\u4ea7\u73af\u5883\u7684\u7b2c\u4e00\u6740\u624b<\/h2>\n<p>\u5728<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/fsdata.site\/redis-rdb-vs-aof-persistence\/\">Redis RDB vs AOF\u6301\u4e45\u5316<\/a>\u4e00\u6587\u4e2d\u6211\u4eec\u8ba8\u8bba\u4e86\u6570\u636e\u53ef\u9760\u6027\u3002\u7f13\u5b58\u5931\u6548\u624d\u662f\u7ebf\u4e0a\u53ef\u7528\u6027\u7684\u6838\u5fc3\u56e0\u7d20\u3002<\/p>\n<h2>\u573a\u666f\u4e00\uff1a\u7f13\u5b58\u51fb\u7a7f<\/h2>\n<pre><code class=\"language-java\">Object value = redis.get(key);\\nif (value == null) {\\n    synchronized(this) { value = redis.get(key); }\\n}<\/code><\/pre>\n<h2>\u573a\u666f\u4e8c\uff1a\u7f13\u5b58\u7a7f\u900f \u2014 \u5e03\u9686\u8fc7\u6ee4\u5668<\/h2>\n<pre><code class=\"language-java\">if (!bloom.mightContain(key)) return null;<\/code><\/pre>\n<h2>\u573a\u666f\u4e09\uff1a\u7f13\u5b58\u96ea\u5d29 \u2014 \u968f\u673aTTL<\/h2>\n<pre><code class=\"language-java\">redis.setex(key, baseTtl + randomOffset(0,300), value);<\/code><\/pre>\n<h2>\u5173\u952e\u8981\u70b9<\/h2>\n<ol>\n<li><strong>\u51fb\u7a7f \u2192 \u4e92\u65a5\u9501<\/strong><\/li>\n<li><strong>\u7a7f\u900f \u2192 \u5e03\u9686\u8fc7\u6ee4\u5668 + \u7a7a\u503c\u7f13\u5b58<\/strong><\/li>\n<li><strong>\u96ea\u5d29 \u2192 \u968f\u673aTTL + \u591a\u7ea7\u7f13\u5b58<\/strong><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Redis \u7f13\u5b58\u4e09\u5927\u9632\u62a4\u7b56\u7565\u8be6\u89e3\uff1a\u51fb\u7a7f\u7528\u4e92\u65a5\u9501\u3001\u7a7f\u900f\u7528\u5e03\u9686\u8fc7\u6ee4\u5668\u3001\u96ea\u5d29\u7528\u968f\u673a\u8fc7\u671f\u65f6\u95f4\u3002\u9644 Java \u5b8c\u6574\u5b9e\u73b0\u4ee3\u7801\u3002<\/p>\n","protected":false},"author":2,"featured_media":209,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[38,45,53,66,73],"class_list":["post-195","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-database","tag-redis","tag-45","tag-53","tag-66","tag-73"],"_links":{"self":[{"href":"https:\/\/fsdata.site\/index.php?rest_route=\/wp\/v2\/posts\/195","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fsdata.site\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fsdata.site\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fsdata.site\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/fsdata.site\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=195"}],"version-history":[{"count":4,"href":"https:\/\/fsdata.site\/index.php?rest_route=\/wp\/v2\/posts\/195\/revisions"}],"predecessor-version":[{"id":245,"href":"https:\/\/fsdata.site\/index.php?rest_route=\/wp\/v2\/posts\/195\/revisions\/245"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fsdata.site\/index.php?rest_route=\/wp\/v2\/media\/209"}],"wp:attachment":[{"href":"https:\/\/fsdata.site\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=195"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fsdata.site\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=195"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fsdata.site\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=195"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}