title: How does Redis work when RAM starts filling up?
body: <p>I could be totally off, but my understanding of how <em>cache</em> stores used to work before they began to add persistence features, is that items would get expired based on their <a href="https://en.wikipedia.org/wiki/Time_to_live" rel="nofollow noreferrer">TTL</a>. And if the store started to fill up available RAM, they would each have their algorithms for <em>expiring</em> the least &quot;important&quot; keys in the store.</p>
  <p>Now I read that Redis has <a href="https://redis.io/topics/persistence" rel="nofollow noreferrer"><em>persistence</em></a> features. But you can turn them off. Assuming you turn off persistence, what happen when RAM fills up? How does Redis decide what to expire?</p>
  <p>I expect to have lots of data without TTLs and want to make sure it's safe to let Redis figure out what to expire.</p>