跳到主要内容
学院
初级 代码街区

Redis

为缓存、队列和排行榜带来内存级速度。

Redis keeps data in memory and typically answers in under a millisecond, which is why apps put it next to their main database. It is a key-value store whose values are real data structures: strings, hashes, lists, sets and sorted sets. This track starts from zero in redis-cli. You will store and expire keys, count with atomic increments and model objects with hashes. Then you will build the patterns that power real apps: a cache in front of a database, a rate limiter, a job queue, a leaderboard and live events with pub/sub.

Every example shows the exact replies redis-cli prints, so you always know what to expect.

课时
14
时长
2 小时
级别
初级

本课程的内容目前为英文。

  • 铜牌 可挑战
  • 银牌 可挑战
  • 金牌 未解锁

准备好证明自己了吗?

三场考试正等着你:铜牌、银牌和金牌。

前往考试

学完后你将能够

  • Store, read and expire keys in redis-cli
  • Count safely with INCR and model objects with hashes
  • Put a cache in front of a database with cache-aside
  • Rate-limit requests and run a simple job queue
  • Build a live leaderboard with sorted sets
  • Choose between pub/sub and streams for events

学习旅程

  1. 1
    第 1 单元

    Keys in memory

    What Redis is, strings and counters, expiry, naming keys, and hashes.

    0 / 4
  2. 2
    第 2 单元

    Patterns that power apps

    Caching, rate limiting, queues and sets, leaderboards, and live events.

    0 / 6
  3. 3
    第 3 单元

    What comes next

    Transactions and scripts, persistence and replication, streams in depth, and Redis from code.

    0 / 4

快速导航