0Pricing
Redis Caching & Messaging (Pub/Sub, Streams) · Lesson

Implementing Basic Cache Patterns

Learn to implement Cache-Aside and Write-Through patterns using Redis for common application data.

Basic Cache Patterns Intro

Welcome! In this lesson, we'll dive into two fundamental caching patterns: Cache-Aside and Write-Through. These patterns help you integrate Redis into your applications to store and retrieve data efficiently.

Understanding them is key to building responsive and scalable systems.

What is Cache-Aside?

The Cache-Aside pattern is one of the most common ways to use a cache. Here, your application is responsible for managing both the cache and the primary data store (like a database).

  • When reading data, the app first checks the cache.
  • If found (a 'cache hit'), it returns the cached data.
  • If not found (a 'cache miss'), it fetches the data from the database, stores it in the cache, and then returns it.

All lessons in this course

  1. Why Cache? Introduction to Caching
  2. Implementing Basic Cache Patterns
  3. Cache Eviction and Expiration
  4. Preventing Cache Stampedes and Thundering Herds
← Back to Redis Caching & Messaging (Pub/Sub, Streams)