# File managed by puppet

# Run memcached as a daemon.
-d

# pidfile
-P /var/run/memcached.pid

# Log memcached's output
logfile <%= @logfile -%>

<% if @verbosity -%>
# Verbosity
-<%= @verbosity %>
<% end -%>

# Use <num> MB memory max to use for object storage.
<% Puppet::Parser::Functions.function('memcached_max_memory') -%>
-m <%= scope.function_memcached_max_memory([@max_memory]) %>

<% if @lock_memory -%>
# Lock down all paged memory.  There is a limit on how much memory you may lock.
-k
<% end -%>

<% if @unix_socket -%>
# UNIX socket path to listen on
-s <%= @unix_socket %>
<% else -%>
# IP to listen on
-l <%= @listen_ip %>

# TCP port to listen on
-p <%= @tcp_port %>

# UDP port to listen on
-U <%= @udp_port %>
<% end -%>

# Run daemon as user
-u <%= @user %>

# Limit the number of simultaneous incoming connections.
-c <%= @max_connections %>

# Number of threads to use to process incoming requests.
-t <%= @processorcount %>

<% if @item_size -%>
# Override  the  default size of each slab page
-I <%= @item_size %>
<% end -%>

