SystemTutor
About
Sign in
Loading course documentation…
SystemTutor

COURSES

  • Data Structures & Algorithms
  • CSS MasterclassNew course
  • System DesignNew course

PRACTICE

  • Algorithm practice
  • CSS practice

LEGAL

  • Privacy Policy
  • Terms of Service
  • About

© 2026 SystemTutor. All rights reserved.

Built with 🫶 by Shatlyk

System design
Data Storage and Database ChoicesReplication, Partitioning, and ConsistencyCaching and Content Delivery in Practice Keep a disabled link disabled Choosing where a read gets its data
Data systems

Keep a disabled link disabled

A visitor reads an active short link from the database and pauses before copying it into the cache.

An earlier request holds v1, an active short-link record, and pauses before filling the cache. The admin will disable the link in the database, creating v2, and invalidate the cache. Decide what a new visitor will see once the paused reader resumes.

Challenge 1 of 2

What will the next visitor see after the admin disables the link?

The earlier reader resumes first. The next visitor trusts a cache hit and arrives before expiry.IncorrectThe lookup never checks the disabled record in storage.CorrectThe delayed reader restores its old active copy after invalidation.IncorrectThe delayed fill has already put the entry back.
Preview · Event 1 of 5
v1Earlier readerHolding v1v1Databasev1 · activeCache drawerEmptyNext visitorWaiting

A reader has fetched the old mapping and paused before filling the cache.The admin commits v2 (disabled) and invalidates the cache. The earlier reader still holds v1.The earlier reader resumes and fills the drawer with v1 (active). The database still holds v2.The next lookup hits the stale entry immediately.The cached record sends the visitor to the old destination.

How is this practice?

Previous lessonCaching and Content Delivery in PracticeNext lesson Choosing where a read gets its data
Edit on GitHubReport on GitHub