Redis throws away keys before memory is full

I am using Redis as a simple key store. I am actually using the Heroku plugin (Redis Cloud), but I don't think it matters for this question. Okay, available memory for Redis is 1GB and the eviction policy is allkeys lru

. I am not setting ttl when storing data. My understanding is that data stays in Redis until memory is full. Then the last recent data is deleted. But that's not what is happening. Redis uses about 3MB of memory all the time and deletes data very quickly.

Am I understanding something wrong here? Why doesn't Redis store data in memory?

Thanks
Simon

+3


source to share


1 answer


Found. Radish itself is not a problem. One of the Django plugins I'm using (django-redis-cache, redis-py) sets the default TTL to 300 seconds.



+2


source







All Articles