The default policy is noeviction, which means a full Redis returns errors on writes rather than evicting anything.
CONFIG GET maxmemory-policy
1) "maxmemory-policy"
2) "noeviction" # writes fail with OOM
# for a pure cache
CONFIG SET maxmemory-policy allkeys-lru
# for an instance holding both cache and queue data
CONFIG SET maxmemory-policy volatile-lru
# → only keys WITH a TTL are candidates
noeviction is the right default for an instance holding queue data, because silently discarding jobs is worse than failing loudly. The mistake is running one instance for both roles: allkeys-lru will happily evict the queue and volatile-lru only protects it if every cache entry has a TTL, which is a discipline nothing enforces. Two instances, or two databases with different policies, is the honest arrangement — and policies are per instance, not per database, which decides it.