Expert rules for caching, key management, and performance in Redis.
ACL SETUSER) to restrict commands by user/role.FLUSHALL, KEYS, CONFIG, and SHUTDOWN in production.read_timeout and connect_retries to handle transient network saturation.app:user:123, rate:limit:ip:1.1.1.1).SCAN instead of KEYS. Use UNLINK instead of DEL for background reclamation of large keys.EVALSHA for atomic logic; ensure scripts are pre-loaded to save bandwidth.ZRANGE, HGETALL, and LRANGE results with offsets/limits.allkeys-lru for general caches and volatile-lru for mixed persistent/ephemeral data.lazyfree-lazy-eviction and lazyfree-lazy-expire (Redis 4.0+) to offload cleanup from the main thread.Used Memory RSS vs Used Memory Dataset. Large fragmentation suggests a need for MEMORY PURGE or scaling.HSET) for object properties to allow O(1) field access without decoding a full JSON string.