跳至主要內容
kitlocal.dev

Redis 指令參考

本機執行

100% 在你的瀏覽器中處理。輸入與輸出絕不會離開你的裝置。

可搜尋的 Redis 指令參考,附範例。

運作原理

Redis is a single-threaded in-memory data-structure store: choose atomic O(1)/O(log N) operations per type, always prefer `SCAN`/`HSCAN`/`SSCAN`/`ZSCAN` over blocking `KEYS *`, and cap hot keys with TTL.

生存指南

最先需要掌握的少數核心指令。

43 個指令

鍵盤快捷鍵/聚焦搜尋列JK移動選取項目C複製選取的指令F將選取項目加入或移除書籤Esc清除搜尋

Keys, TTL & Strings

Store caches, distribute atomic locks (`SET ... NX EX`), counters, and expire keys.

  • 必備

    Verify Redis connectivity and measure round-trip liveness (`PONG`)

    PING [message]

    使用時機

    Standard healthcheck command returning `PONG` (or echoing optional message).

    範例

    PING

    執行結果

    PONG

Hashes & Lists

Model multi-field objects compactly with Hashes and build FIFO queues/caps with Lists.

Sets, Sorted Sets & HyperLogLog

Track unique members, leaderboards, sliding-window rate limits, and cardinality.

Streams, Pub/Sub & Transactions

Publish realtime messages, consume persistent streams, and run atomic MULTI/EXEC.

Non-Blocking Scan, Memory & Ops

Inspect keys safely in production, check slow logs, memory usage, and persistence.

在 KitLocal 工具中試用

已於 2026年11月15日 驗證 · 已對照 Redis 7.x CLI & Core Data Structures 驗證

資料來源: Redis Commands Reference · Redis Data Types Guide

請將尖括號內的任何內容替換為你自己的數值。指令均源自官方文件,且範例均在所示版本上實際執行。