From 33c698b70446749c9bf209c864f8ee5c8fc43c01 Mon Sep 17 00:00:00 2001 From: Jonathan Gonzalez V Date: Fri, 15 Aug 2014 15:26:22 -0400 Subject: [PATCH] Added option "auto_removal" this option aim to enable or disable the -M option. According to memcache: -M Disable automatic removal of items from the cache when out of memory. Additions will not be possible until adequate space is freed up. --- manifests/init.pp | 3 ++- templates/memcached.conf.erb | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/manifests/init.pp b/manifests/init.pp index 9c29710ab..a23fc0565 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -18,7 +18,8 @@ $unix_socket = undef, $install_dev = false, $processorcount = $::processorcount, - $service_restart = true + $service_restart = true, + $auto_removal = false ) inherits memcached::params { # validate type and convert string to boolean if necessary diff --git a/templates/memcached.conf.erb b/templates/memcached.conf.erb index 9b48ce9e4..b0d65c5d7 100644 --- a/templates/memcached.conf.erb +++ b/templates/memcached.conf.erb @@ -51,3 +51,7 @@ logfile <%= @logfile -%> -I <%= @item_size %> <% end -%> +<% if @auto_removal -%> +# Disable automatic removal of items from the cache when out of memory +-M +<% end -%> \ No newline at end of file