Tagged articles
5 articles
Page 1 of 1
macrozheng
macrozheng
Jul 3, 2025 · Backend Development

How Long Should the Delay Be in Delayed Double Delete? A Deep Dive into Cache Consistency

This article explores cache‑database consistency strategies, explains strong, weak and eventual consistency, compares cache patterns such as Cache‑Aside, Read‑Through/Write‑Through and Write‑Behind, and details the delayed double‑delete technique, its optimal pause time, and alternative solutions like retry mechanisms and binlog‑based async eviction.

Cache ConsistencyDelayed Double Deletecache-aside
0 likes · 13 min read
How Long Should the Delay Be in Delayed Double Delete? A Deep Dive into Cache Consistency
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Jan 7, 2025 · Backend Development

Cache Consistency: Pitfalls of Delayed Double Delete and Lease/Versioning Solutions with Redis

This article examines why many large‑scale systems avoid the traditional delayed double‑delete cache‑invalidation strategy, explains its critical drawbacks, and presents alternative lease‑based and version‑based approaches with Lua scripts and Java wrappers for Redis to achieve stronger consistency.

ConsistencyDelayed Double DeleteJava
0 likes · 17 min read
Cache Consistency: Pitfalls of Delayed Double Delete and Lease/Versioning Solutions with Redis
dbaplus Community
dbaplus Community
Dec 7, 2021 · Backend Development

How to Ensure Cache‑Database Consistency: Strategies, Pitfalls & Best Practices

This article explains why caching improves performance, examines the trade‑offs between cache utilization and data consistency, analyzes concurrency‑induced inconsistency scenarios, compares update‑then‑delete versus delete‑then‑update approaches, and recommends asynchronous retry with message queues or binlog subscription to reliably keep cache and database in sync.

CacheDelayed Double Deleteasynchronous-retry
0 likes · 19 min read
How to Ensure Cache‑Database Consistency: Strategies, Pitfalls & Best Practices