Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ For the old behaviour, you need to set listen to '0.0.0.0'.
}
```

### Keep persistent data upon service restart (https://docs.memcached.org/features/restart/)

```ruby
class { 'memcached':
extra_config => ["-e /tmpfs_mount/memory_file"]
}
```

### Install multiple memcached instances

the multiinstance support uses a systemd instance unit file. This will be placed
Expand Down
9 changes: 9 additions & 0 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ The following parameters are available in the `memcached` class:
* [`svcprop_fmri`](#-memcached--svcprop_fmri)
* [`svcprop_key`](#-memcached--svcprop_key)
* [`extended_opts`](#-memcached--extended_opts)
* [`extra_config`](#-memcached--extra_config)
* [`config_tmpl`](#-memcached--config_tmpl)
* [`disable_cachedump`](#-memcached--disable_cachedump)
* [`max_reqs_per_event`](#-memcached--max_reqs_per_event)
Expand Down Expand Up @@ -401,6 +402,14 @@ Array of extended options

Default value: `undef`

##### <a name="-memcached--extra_config"></a>`extra_config`

Data type: `Optional[Array[String]]`

Array of extended configarion options

Default value: `undef`

##### <a name="-memcached--config_tmpl"></a>`config_tmpl`

Data type: `String`
Expand Down
4 changes: 4 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@
# @param extended_opts
# Array of extended options
#
# @param extra_config
# Array of extended configarion options
#
# @param config_tmpl
# Use a different config template
#
Expand Down Expand Up @@ -177,6 +180,7 @@
String $svcprop_fmri = 'memcached:default',
String $svcprop_key = 'memcached/options',
Optional[Array[String]] $extended_opts = undef,
Optional[Array[String]] $extra_config = undef,
String $config_tmpl = $memcached::params::config_tmpl,
Boolean $disable_cachedump = false,
Optional[Integer] $max_reqs_per_event = undef,
Expand Down
4 changes: 4 additions & 0 deletions templates/memcached.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ logfile <%= @logfile -%>
-o <%= @extended_opts.join(',') -%>
<% end -%>

<% if @extra_config -%>
<%= @extra_config.join(',') -%>
<% end -%>

<% if @disable_cachedump -%>
-X
<% end -%>
Expand Down