Tagged articles
expiration
37 articles · Page 1 of 1
This guide details a systematic approach to diagnose and resolve Redis high memory usage, covering memory composition analysis, big key detection via SCAN and MEMORY USAGE, root cause identification through TTL and access patterns, safe deletion using UNLINK and batched HDEL, and long-term governance via TTL jitter, index sharding, and monitoring alerts.
Big KeysDevOpsRedis
0 likes · 47 min read


liandkMay 8, 2026 · Mobile Development
uni.storage, the data‑persistence solution for UniApp, can cause data loss, memory leaks, security risks, and performance problems if misused; this guide outlines four typical pitfalls—large objects, missing expiration, frequent reads/writes, and unhandled async errors—and provides concrete best‑practice fixes.
CachingMemory Leakdata persistence
0 likes · 4 min read

Redis uses multiple expiration and eviction mechanisms—including lazy deletion, periodic scanning, and memory eviction—to balance performance and memory usage, and this guide explains each strategy, shows how to configure them, and provides Java/Jedis code examples for setting TTLs, handling large objects, preventing cache avalanches, and monitoring stats.
CacheJavaJedis
0 likes · 7 min read

This article explains how Redis handles key expiration, the TTL and TTI concepts, periodic and lazy deletion strategies, their impact on persistence and replication, and the various memory eviction policies—including LRU and LFU—so developers can efficiently manage data and improve system performance.
LFULRURedis
0 likes · 10 min read

This article details Redis's expiration mechanisms, comparing lazy (passive) deletion with periodic (active) deletion, and outlines the auxiliary memory eviction policies, highlighting their principles, pros, cons, and ideal use cases.
Redisdatabaseexpiration
0 likes · 7 min read


JD TechFeb 24, 2025 · Backend Development
This article explains how Caffeine implements element expiration using three built‑in policies and a custom TimeWheel strategy, detailing the construction of the timer wheel, bucket selection, scheduling, advancing, and eviction logic within the cache's maintenance cycle.
BackendCacheCaffeine
0 likes · 15 min read

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.
Redisdatabasesexpiration
0 likes · 5 min read

This article presents a Python script that retrieves a domain's SSL certificate information, parses its start and expiration dates, converts them to datetime objects, and calculates the remaining days until the certificate expires, providing a simple command‑line tool for monitoring certificate validity.
Pythonautomationcertificate
0 likes · 3 min read

This article explains how to implement a single‑process lock in Go that records an owner, allows only the owner to unlock, and automatically releases the lock after a specified timeout, providing full source code and a walkthrough of the key functions.
ConcurrencyGoLock
0 likes · 5 min read

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.
eviction policyexpirationlazy deletion
0 likes · 5 min read

This article walks through implementing EasyCache, a Go‑based in‑memory cache with sharding, lock‑free concurrency, LRU eviction, and configurable expiration, explaining the underlying data structures, goroutine cleanup logic, and key handling with concrete code examples.
BackendCacheConcurrency
0 likes · 9 min read


政采云技术Oct 25, 2023 · Databases
This article provides a comprehensive overview of Redis memory management, detailing how maxmemory limits trigger various eviction policies, explaining the internal freeMemoryIfNeeded algorithm, and describing expiration mechanisms—including active and lazy deletion—and offering guidance on selecting the appropriate eviction strategy for different workloads.
CacheLFULRU
0 likes · 18 min read

This article explains Redis's two expiration strategies—periodic active deletion and lazy deletion—detailing how the EXPIRE command works, the new NX/XX/GT/LT options introduced in version 7.0, the impact of unsynchronized clocks, and the underlying implementation code.
Active ExpirationRedisdatabase
0 likes · 6 min read

The article explains that in MySQL 8.0 the binlog_expire_logs_seconds variable can fail to purge old binary logs when a backup lock is held, demonstrates the problem with step‑by‑step reproduction, analyzes the cause, and offers practical work‑arounds and references to the official bug report.
XtraBackupbinlogexpiration
0 likes · 5 min read

This tutorial explains how to install the SHC tool on CentOS 8, create a simple shell script, encrypt it into a binary executable, verify the file types, run the encrypted script, and optionally set an expiration date or custom expiration message.
Linuxbashencryption
0 likes · 5 min read

Redis handles key expiration using commands like EXPIRE, PEXPIRE, EXPIREAT, and PEXPIREAT, offers TTL queries, and employs three deletion strategies—timed, lazy, and periodic scanning—while its eight eviction policies (e.g., volatile‑lru, allkeys‑lfu, noeviction) and refined LRU/LFU algorithms manage memory pressure efficiently.
Eviction PoliciesLFULRU
0 likes · 14 min read

The article explains Redis's two expiration key removal mechanisms—lazy deletion, which removes keys only when accessed, and periodic deletion, which randomly scans and deletes expired keys at regular intervals—detailing their concepts, pros, cons, and underlying source‑code implementations.
Redisactive expiredatabase
0 likes · 4 min read

This article explains how Redis handles memory exhaustion by setting key expirations with commands like expire and pexpire, describes its lazy and periodic expiration strategies, details the eight configurable eviction policies, and dives into the internal LRU and LFU algorithms used for key eviction.
LFULRURedis
0 likes · 12 min read

This article explains Redis's memory eviction policies and expiration strategies, detailing how different eviction modes (such as noeviction, allkeys‑lru, volatile‑ttl, allkeys‑lfu) and lazy versus periodic deletion work together to manage limited memory and ensure efficient cache performance.
databasesexpirationmemory eviction
0 likes · 6 min read


ZhiKe AIMar 15, 2021 · Backend Development
This article explains how to create a simple single‑node in‑memory cache that supports per‑entry expiration by defining a generic cache interface and implementing it with Caffeine, using ConcurrentHashMap to store multiple caches keyed by expiration time.
CacheCaffeineIn-Memory
0 likes · 5 min read

This article explains how Redis handles key expiration, the commands for setting TTL, the three expiration strategies, the eight memory‑eviction policies, and the internal LRU and LFU algorithms used to manage hot data when memory is exhausted.
LFULRUeviction
0 likes · 12 min read

This article explains how Redis handles memory exhaustion by setting key expirations, describes the four expiration commands, details the three expiration strategies, outlines the eight eviction policies, and dives into the inner workings of Redis's LRU and LFU algorithms with configuration examples.
LFULRURedis
0 likes · 13 min read

This article outlines the essential design points for building a local Java cache—including data structures, size limits, eviction policies, expiration handling, thread safety, blocking mechanisms, simple APIs, and optional persistence—while providing concrete code snippets and implementation guidance.
CacheJavaeviction policy
0 likes · 11 min read

This article explains Redis's cache expiration policies—including timed, periodic, and lazy eviction—details the internal structure and parsing of RDB files, and describes the AOF persistence mechanism with its write‑ahead logging, synchronization options, and rewrite process, providing a comprehensive view of Redis data durability.
AOFCacheRDB
0 likes · 11 min read

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.
RedisTTLexpiration
0 likes · 10 min read

This guide explores Redis key expiration policies—including active, lazy, and periodic expiration—memory eviction strategies, resource consumption, thread model, and transaction mechanisms, providing practical insights on configuring TTL, optimizing memory usage, and understanding Redis’s single‑threaded architecture for reliable data handling.
RedisTransactionsexpiration
0 likes · 12 min read

This article explains the three Redis expiration‑key deletion strategies—timed, lazy, and periodic—their advantages and disadvantages, how Redis implements lazy and periodic deletion, and how persistence mechanisms such as RDB, AOF, and replication handle expired keys.
Deletion StrategyRedisTimed Deletion
0 likes · 10 min read

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.
Key DeletionRedisdatabase
0 likes · 22 min read

This article explains how Redis removes expired keys using periodic and lazy deletion, describes the slave expiration handling, details the asynchronous memory reclamation commands like UNLINK and FLUSHALL ASYNC, and outlines the various maxmemory eviction policies including LRU, LFU, and their implementations.
CacheLFULRU
0 likes · 13 min read

This article explains why Redis is chosen for projects—highlighting its performance and concurrency benefits, detailing its data types, expiration and eviction policies, and offering solutions to common issues such as cache consistency, avalanche, penetration, and key‑competition.
ConcurrencyConsistencyRedis
0 likes · 17 min read

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.
RedisTTLcommands
0 likes · 9 min read


21CTOSep 3, 2019 · Databases
This article explores Redis's text-based RESP protocol, examines whether Redis truly supports ACID transactions, explains its optimistic lock implementation, details persistence mechanisms like RDB and AOF, discusses memory‑saving data structures, outlines replication processes, and reviews expiration deletion strategies, providing a comprehensive technical overview.
ACIDReplicationexpiration
0 likes · 22 min read

This article explains Redis's core data structures—string, hash, list, set, and sorted set—covers why and how data expires, details Redis's periodic and lazy expiration mechanisms, outlines the six memory eviction policies, and provides a Java LinkedHashMap‑based LRU cache implementation.
Eviction PoliciesJavaLRU cache
0 likes · 9 min read

This article explains the design and inner workings of Google Guava's Cache library, covering JVM‑level caching, the advantages over simple maps, a real‑world Kafka alerting scenario, code examples, expiration policies, LRU handling, concurrency mechanisms, and the builder pattern used to configure caches.
ConcurrencyGuavaJava
0 likes · 10 min read


ITPUBMay 31, 2018 · Databases
This article provides a comprehensive review of Redis, covering why it’s used, its performance advantages, single‑threaded speed, data types and use cases, expiration policies, memory eviction strategies, consistency challenges, and practical solutions for cache penetration, avalanche, and concurrent key competition.
CachingConcurrencyConsistency
0 likes · 16 min read

This article dissects Spring Session’s Redis implementation, explaining the three key types (A, B, C), their TTL settings, how they enable session sharing, the pitfalls of Redis expiration, concurrency challenges, and the sophisticated cleanup and notification mechanisms Spring Session employs to ensure reliable session management.
BackendConcurrencyJava
0 likes · 15 min read

The article explains how Redis replicas can return keys that should have expired due to the master‑only expiration process, describes the three expiration strategies (lazy, periodic, active), and offers practical solutions such as using SCAN or upgrading to Redis 3.2 to avoid stale reads.
CacheRedisReplication
0 likes · 9 min read
