Devs HiveDevs Hive
System DesignNew
AI InterviewNew
Interview Q&A
Roadmaps
Courses

Interview prep

  • QuizzesTest yourself against the clock
  • MentoringMock interviews and personal prep

Learning

  • Books for the AI eraBooks worth reading
Sign In
Menu
System DesignNewAI InterviewNewInterview Q&ARoadmapsCourses

Interview prep

QuizzesMentoring

Learning

Books for the AI era
© 2026 Devs Hive. All rights reserved.
Privacy policy·LinkedInYouTube
System DesignNew
AI InterviewNew
Interview Q&A
Roadmaps
Courses

Interview prep

  • QuizzesTest yourself against the clock
  • MentoringMock interviews and personal prep

Learning

  • Books for the AI eraBooks worth reading
System DesignNewAI InterviewNewInterview Q&ARoadmapsCourses

Interview prep

QuizzesMentoring

Learning

Books for the AI era

Join us

Sign in to access all features

Sign InCreate account
←All courses

Text course

Caching Fundamentals: from Materialized Views to Redis

A course for beginners: why cache data, where a cache lives, Materialized Views in PostgreSQL, Redis, patterns, invalidation and common problems.

7 lessons · 1 quiz

Start the course

You need a free account to take the course.

Caching Fundamentals: from Materialized Views to Redis

Your site has started to slow down, and the database is maxing out its CPU. The first advice you'll hear: "add a cache". But a cache added without understanding brings new bugs: stale prices, mismatches between servers and the database going down at the worst moment.

In seven short lessons, on the example of one online shop, you'll learn:

  1. why cache: where latency comes from, what the hit ratio is and why a cache is always a trade-off with data freshness;
  2. where a cache lives: the browser, a CDN, application memory, Redis and the database itself;
  3. Materialized Views: a cache for heavy reports right in PostgreSQL, with no new infrastructure;
  4. Redis: data structures, TTL, eviction and why a cache is not a source of truth;
  5. patterns and invalidation: cache-aside, write-through, write-behind and how to clear stale data in time;
  6. common problems: cache stampede, cache penetration and cold start.

At the end of the course there's a final quiz with 20 questions on real scenarios. To start, basic SQL and some experience with a simple HTTP API are enough. Caching is one of the most frequent topics in backend developer interviews and in System Design.

Syllabus

  1. 1Why cache data
  2. 2Where a cache lives: from the browser to the database
  3. 3Materialized Views: a cache inside the database
  4. 4Redis: an in-memory database
  5. 5Caching patterns: cache-aside and friends
  6. 6Invalidation and consistency
  7. 7When a cache hurts: stampede, penetration and cold start
Start the course
Final quiz20 questions