X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/ef59a8bc9ef426f9d24e701e9b73a6a03ddd3d0f..165346ca29972817b1245e689315edeba1fe369b:/redis.conf diff --git a/redis.conf b/redis.conf index b087417a..a7914fd1 100644 --- a/redis.conf +++ b/redis.conf @@ -148,6 +148,25 @@ dir ./ # # maxmemory +# MAXMEMORY POLICY: how Redis will select what to remove when maxmemory +# is reached? You can select among five behavior: +# +# volatile-lru -> remove the key with an expire set using an LRU algorithm +# allkeys-lru -> remove any key accordingly to the LRU algorithm +# volatile-random -> remove a random key with an expire set +# allkeys->random -> remove a random key, any key +# volatile-ttl -> remove the key with the nearest expire time (minor TTL) +# +# maxmemory-policy volatile-lru + +# LRU and minimal TTL algorithms are not precise algorithms but approximated +# algorithms (in order to save memory), so you can select as well the sample +# size to check. For instance for default Redis will check three keys and +# pick the one that was used less recently, you can change the sample size +# using the following configuration directive. +# +# maxmemory-sample 3 + ############################## APPEND ONLY MODE ############################### # By default Redis asynchronously dumps the dataset on disk. If you can live