REDIS: allkeys-lru -> volatile-lru to avoid got evict if lack of memory (#17720)

Follow on PR: #17707
This commit is contained in:
Wang Qi
2026-08-03 15:44:59 +08:00
committed by GitHub
parent 1f8e9af644
commit bb1879ba35
4 changed files with 22 additions and 12 deletions

View File

@@ -235,7 +235,7 @@ services:
redis:
# swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/valkey/valkey:8
image: valkey/valkey:8
command: ["redis-server", "--requirepass", "${REDIS_PASSWORD}", "--maxmemory", "128mb", "--maxmemory-policy", "allkeys-lru"]
command: ["redis-server", "--requirepass", "${REDIS_PASSWORD}", "--maxmemory", "128mb", "--maxmemory-policy", "volatile-lru"]
env_file: .env
ports:
- ${REDIS_PORT}:6379