# Redis Configuration
port 6379
bind 0.0.0.0

# Memory
maxmemory 512mb
maxmemory-policy allkeys-lru

# Увеличиваем лимит на размер строки для больших base64 изображений
proto-max-bulk-len 512mb

# Persistence - RDB
save 900 1
save 300 10
save 60 10000
stop-writes-on-bgsave-error yes
rdbcompression yes
rdbchecksum yes
dbfilename dump.rdb
dir /data

# Persistence - AOF
appendonly yes
appendfilename "appendonly.aof"
appendfsync everysec
no-appendfsync-on-rewrite no
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
aof-load-truncated yes

# Logging
loglevel notice
logfile ""

# Performance
tcp-backlog 511
timeout 0
tcp-keepalive 300