Why Redis Doesn’t Immediately Free Expired Keys – Understanding Its Deletion Strategies
Redis does not instantly release memory for expired keys; instead it employs three deletion strategies—timed, periodic, and lazy—to balance memory usage, CPU load, and data accuracy, with periodic scans optimized by random sampling and time limits.
