<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>数据结构 on Weiming's Blog</title><link>https://axerzone.cn/tags/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84/</link><description>Recent content in 数据结构 on Weiming's Blog</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><copyright>© 2026 Weiming</copyright><lastBuildDate>Tue, 20 Feb 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://axerzone.cn/tags/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84/index.xml" rel="self" type="application/rss+xml"/><item><title>Redis 五种数据结构</title><link>https://axerzone.cn/posts/redis-data-structures/</link><pubDate>Tue, 20 Feb 2024 00:00:00 +0000</pubDate><guid>https://axerzone.cn/posts/redis-data-structures/</guid><description>&lt;h1 class="relative group"&gt;Redis 五种数据结构，各有各的妙用
 &lt;div id="redis-五种数据结构各有各的妙用" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#redis-%e4%ba%94%e7%a7%8d%e6%95%b0%e6%8d%ae%e7%bb%93%e6%9e%84%e5%90%84%e6%9c%89%e5%90%84%e7%9a%84%e5%a6%99%e7%94%a8" aria-label="锚点"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h1&gt;
&lt;p&gt;Redis 谁都用过吧？但我发现很多人（包括之前的我）用 Redis 就只会 &lt;code&gt;SET&lt;/code&gt; 和 &lt;code&gt;GET&lt;/code&gt;，把它当个 key-value 缓存使。其实 Redis 有五种基本数据结构，每种都有自己的应用场景，选对了效率翻倍，选错了可能还不如不用。&lt;/p&gt;

&lt;h2 class="relative group"&gt;String——最简单但别小看它
 &lt;div id="string最简单但别小看它" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#string%e6%9c%80%e7%ae%80%e5%8d%95%e4%bd%86%e5%88%ab%e5%b0%8f%e7%9c%8b%e5%ae%83" aria-label="锚点"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;String 是最基础的数据类型。一个 key 对应一个 value，value 最大 512MB。&lt;/p&gt;</description></item></channel></rss>