dumb_terminal
dumb_terminal

Reputation: 1825

Redis LRU-Eviction, Evicted Item Persistance

I am new to redis, So please bear with me. Lets say I have configured a redis to have a maxmemory of 50mb, and I set eviction policy to allkeys-lru. And then I keep inserting and querying data. When the process memory gets to 50mb it starts to evict least recently used items.

My questions is do the evicted items persist on disk or are they lost for ever ? I mean if I do a GET for an evicted key, what do I get. Does redis fetch it from disk ?

Upvotes: 1

Views: 436

Answers (1)

hobbs
hobbs

Reputation: 239851

Evicted is gone. With redis, nothing is on disk that isn't also in memory. (Technically, there will still probably be traces of it for some time, but that's just implementation details. As far as the data model is concerned, it's been deleted, and a GET won't find it.)

Upvotes: 3

Related Questions