Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make memcached configuration section more generic #2494

Merged
merged 1 commit into from
Oct 10, 2024
Merged
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
24 changes: 21 additions & 3 deletions memcached/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,30 @@ Memcached's APIs provide a very large hash table distributed across multiple mac
$ docker run --name my-memcache -d %%IMAGE%%
```

## Setting Memory Usage
### Configuration

To customize the configuration of the memcached server, first obtain the upstream configuration options from the container:

```console
$ docker run --name my-memcache -d %%IMAGE%% memcached -m 64
$ docker run --rm %%IMAGE%% -h
```

This would set the Memcached server to use 64 megabytes for storage.
Using `docker run`:

```console
$ docker run --name my-memcache -d %%IMAGE%% memcached --memory-limit=64
```

or using Docker Compose:

```yaml
services:
memcached:
image: %%IMAGE%%
command:
- --conn-limit=1024
- --memory-limit=64
- --threads=4
```

For infomation on configuring your memcached server, see the extensive [wiki](https://github.com/memcached/memcached/wiki).