Tagged articles
14 articles
Page 1 of 1
java1234
java1234
Jan 17, 2026 · Databases

Do Expired Redis Keys Get Deleted Instantly?

Redis uses both time‑based and lazy expiration, marking keys as expired at their TTL but only removing them on the next access or during periodic cleanup, so expired keys are not deleted the instant they expire.

JedisKey ExpirationLazy Deletion
0 likes · 5 min read
Do Expired Redis Keys Get Deleted Instantly?
Ma Wei Says
Ma Wei Says
Feb 10, 2025 · Databases

How Redis Handles Expired Keys: Periodic vs Lazy Deletion Strategies

This article explains Redis's two expiration mechanisms—periodic scanning with configurable frequency and lazy deletion on client access—detailing their configurations, execution steps, performance trade‑offs, and replication pitfalls to help developers manage memory efficiently.

ExpirationLazy DeletionMemory Management
0 likes · 5 min read
How Redis Handles Expired Keys: Periodic vs Lazy Deletion Strategies
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Apr 18, 2024 · Databases

Redis Expiration and Memory Eviction Strategies Explained

This article explains how to set key expiration times in Redis, the lazy and periodic deletion mechanisms for expired data, and the various memory eviction policies that Redis employs when the maxmemory limit is reached, providing a comprehensive guide for interview preparation.

ExpirationLazy DeletionPeriodic Deletion
0 likes · 5 min read
Redis Expiration and Memory Eviction Strategies Explained
dbaplus Community
dbaplus Community
Oct 22, 2023 · Databases

How Redis Implements Lazy Deletion and When Expired Keys Stay Undeleted

This article explains Redis's two expiration mechanisms—lazy (access‑time) and periodic deletion—then dives into the source code of lookupKey, expireIfNeeded, deleteExpiredKeyAndPropagate, and the underlying delete functions, highlighting the differences between synchronous and asynchronous deletion, the conditions that prevent deletion of expired keys, and practical recommendations for configuring lazyfree.

Lazy DeletionMemory Managementasynchronous delete
0 likes · 16 min read
How Redis Implements Lazy Deletion and When Expired Keys Stay Undeleted
Code Ape Tech Column
Code Ape Tech Column
Feb 21, 2022 · Backend Development

Cache Consistency Issues and Solutions: Cache‑Aside Pattern, Lazy Deletion, and High‑Concurrency Queue Design

This article explains the fundamental cache‑aside pattern, why lazy cache deletion is preferred over immediate updates, analyzes simple and complex cache‑database inconsistency scenarios, and proposes a high‑concurrency queue‑based solution with practical considerations for backend systems.

ConsistencyLazy Deletioncache-aside
0 likes · 11 min read
Cache Consistency Issues and Solutions: Cache‑Aside Pattern, Lazy Deletion, and High‑Concurrency Queue Design
Programmer DD
Programmer DD
Jul 15, 2020 · Databases

Master Redis Expiration: Key Commands That Preserve or Reset TTL

This article explains how Redis handles key expiration, detailing which commands clear or keep TTL, how PERSIST and RENAME affect expiration, the impact of negative or past timestamps, and the lazy and periodic deletion strategies Redis uses to manage expired keys efficiently.

ExpirationLazy DeletionPeriodic Deletion
0 likes · 10 min read
Master Redis Expiration: Key Commands That Preserve or Reset TTL
Qunar Tech Salon
Qunar Tech Salon
Nov 20, 2019 · Databases

Redis Expiration Mechanisms and Key Deletion Strategies

This article explains how Redis manages key expiration using EXPIRE, PEXPIRE, EXPIREAT, and PEXPIREAT commands, details the internal expires dictionary, demonstrates code examples for setting, retrieving, and removing TTL, and discusses the lazy and periodic deletion strategies along with their impact on persistence and replication.

ExpirationKey DeletionLazy Deletion
0 likes · 22 min read
Redis Expiration Mechanisms and Key Deletion Strategies
Architect's Tech Stack
Architect's Tech Stack
Oct 14, 2019 · Databases

Redis Expiration Strategies and Command Effects on Key TTL

This article explains Redis's expiration policies, detailing how commands like DEL, SET, INCR, LPUSH, PERSIST, RENAME, EXPIRE, and EXPIREAT affect key TTLs, and describes the lazy and periodic deletion mechanisms used by Redis to manage expired keys.

ExpirationLazy DeletionPeriodic Deletion
0 likes · 9 min read
Redis Expiration Strategies and Command Effects on Key TTL