vijay
vijay

Reputation: 417

Redis "evicted_keys" purpose

While executing the info command in redis-cli, all the information related to that server is listed. What is the purpose of "evicted_keys"?

Upvotes: 5

Views: 9318

Answers (1)

Linus Thiel
Linus Thiel

Reputation: 39223

Redis can be configured to automatically purge keys as necessary. If so configured, redis will only use a maximum amount of memory, and if it nears the limit, remove keys per some criteria. See Redis as an LRU cache by antirez.

It can be configured to only remove keys that have an expiry time, or all keys. It can remove keys soon to be expired, last recently used keys, or random keys.

evicted_keys in the info is the number of keys that have been evicted (removed).

Upvotes: 9

Related Questions