Tagged articles
7 articles
Page 1 of 1
Lobster Programming
Lobster Programming
Apr 20, 2024 · Backend Development

Why Cache Aside Can Fail: Hidden Risks and the Double-Delete Fix

Cache Aside is a popular caching pattern that reads from cache first and writes through the database before invalidating the cache, but concurrent read‑write scenarios can cause stale data; the article explains these pitfalls and recommends the double‑delete strategy to keep cache and database consistent.

Data Consistencybackend-developmentcache-aside
0 likes · 3 min read
Why Cache Aside Can Fail: Hidden Risks and the Double-Delete Fix
Selected Java Interview Questions
Selected Java Interview Questions
Mar 15, 2024 · Backend Development

Ensuring Data Consistency Between MySQL and Redis in High‑Concurrency Scenarios

The article explains why data inconsistency occurs between MySQL and Redis under high concurrency, analyzes cache‑delete timing issues, and presents two solutions—delayed double‑delete and asynchronous cache updates via MySQL binlog—detailing implementation steps, advantages, drawbacks, and practical considerations.

Async UpdateBinlogCache Consistency
0 likes · 8 min read
Ensuring Data Consistency Between MySQL and Redis in High‑Concurrency Scenarios
IT Architects Alliance
IT Architects Alliance
Feb 14, 2022 · Databases

Ensuring Data Consistency Between MySQL and Redis in High‑Concurrency Scenarios

The article explains why data inconsistency occurs when MySQL and Redis are used together under heavy load, analyzes cache‑delete ordering issues, and presents two practical solutions—delayed double‑delete and asynchronous cache updates via MySQL binlog—along with their trade‑offs and implementation steps.

Async UpdateBinlogCache Consistency
0 likes · 8 min read
Ensuring Data Consistency Between MySQL and Redis in High‑Concurrency Scenarios
Java Interview Crash Guide
Java Interview Crash Guide
Aug 16, 2021 · Backend Development

When to Update Redis Cache: DB‑First vs Cache‑First Strategies Explained

This article examines the consistency challenges of using Redis as a cache, compares three update strategies—updating the database before the cache, deleting the cache before updating the database, and updating the database then deleting the cache—analyzes their pitfalls, and presents practical solutions such as delayed double‑delete, asynchronous retries, and binlog‑driven cache invalidation.

Cache Consistencybackend-developmentcache-aside
0 likes · 17 min read
When to Update Redis Cache: DB‑First vs Cache‑First Strategies Explained
ITPUB
ITPUB
May 27, 2021 · Backend Development

Ensuring Cache‑Database Consistency: Strategies, Pitfalls, and Delayed Double‑Delete

This article examines common cache‑database consistency approaches, analyzes their drawbacks through concrete examples, compares them in a decision matrix, and proposes a reliable solution—delayed double‑delete with retry mechanisms—detailing implementation code, timing considerations, and practical deployment tips for high‑read, low‑write services.

Cache Consistencyconsistency strategiesdatabase
0 likes · 11 min read
Ensuring Cache‑Database Consistency: Strategies, Pitfalls, and Delayed Double‑Delete
dbaplus Community
dbaplus Community
May 31, 2018 · Backend Development

Mastering Cache Update Strategies: When to Delete, Update, or Delay

This article examines three common cache‑update approaches—updating the cache after the database, deleting the cache before the database write, and deleting after the database write—analyzes their drawbacks, and presents improved solutions such as delayed double‑delete, asynchronous retries, and binlog‑driven mechanisms.

BackendConsistencyasynchronous-retry
0 likes · 11 min read
Mastering Cache Update Strategies: When to Delete, Update, or Delay