Add maxmemory-policy configurable
This patch makes the redis maxmemory-policy configurable, and sets default value to allkeys-lru instead of volatile-lru. The setting allkeys-lru helps to remove keys without an exact expire setting of a keypair. Change-Id: I5edaa6a5fbdc99631838478460b36795539292cf
This commit is contained in:
parent
e872e6d5e2
commit
2095f20b83
@ -21,6 +21,7 @@ class redis(
|
||||
$redis_bind = '127.0.0.1',
|
||||
$redis_password = '',
|
||||
$redis_max_memory = '1gb',
|
||||
$redis_max_memory_policy = 'allkeys-lru',
|
||||
$version = '2.2.12',
|
||||
) {
|
||||
|
||||
|
@ -218,6 +218,7 @@ maxmemory <%= redis_max_memory %>
|
||||
# The default is:
|
||||
#
|
||||
# maxmemory-policy volatile-lru
|
||||
maxmemory-policy <%= @redis_max_memory_policy %>
|
||||
|
||||
# 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
|
||||
|
@ -254,6 +254,7 @@ maxmemory <%= redis_max_memory %>
|
||||
# The default is:
|
||||
#
|
||||
# maxmemory-policy volatile-lru
|
||||
maxmemory-policy <%= @redis_max_memory_policy %>
|
||||
|
||||
# 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
|
||||
|
@ -338,6 +338,7 @@ maxmemory <%= redis_max_memory %>
|
||||
# The default is:
|
||||
#
|
||||
# maxmemory-policy volatile-lru
|
||||
maxmemory-policy <%= @redis_max_memory_policy %>
|
||||
|
||||
# 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user