|
1 | | -[](https://github.com/ddev/ddev-memcached/actions/workflows/tests.yml)  |
| 1 | +[](https://github.com/ddev/ddev-memcached/actions/workflows/tests.yml?query=branch%3Amain) |
| 2 | +[](https://github.com/ddev/ddev-memcached/commits) |
| 3 | +[](https://github.com/ddev/ddev-memcached/releases/latest) |
2 | 4 |
|
3 | | -## What is this? |
| 5 | +# DDEV Memcached |
4 | 6 |
|
5 | | -This repository allows you to quickly install Memcached into a [DDEV](https://ddev.readthedocs.io) project using `ddev get ddev/ddev-memcached`. |
| 7 | +## Overview |
6 | 8 |
|
7 | | -## Installation |
8 | | - |
9 | | -For DDEV v1.23.5 or above run |
| 9 | +[Memcached](https://memcached.org/) is a free & open source, high-performance, distributed memory object caching system. |
10 | 10 |
|
11 | | -```sh |
12 | | -ddev add-on get ddev/ddev-memcached && ddev restart |
13 | | -``` |
| 11 | +This add-on integrates Memcached into your [DDEV](https://ddev.com/) project. |
14 | 12 |
|
15 | | -For earlier versions of DDEV run |
| 13 | +## Installation |
16 | 14 |
|
17 | | -```sh |
18 | | -ddev get ddev/ddev-memcached && ddev restart |
| 15 | +```bash |
| 16 | +ddev add-on get ddev/ddev-memcached |
| 17 | +ddev restart |
19 | 18 | ``` |
20 | 19 |
|
21 | | -## Explanation |
22 | | - |
23 | | -This Memcached recipe for [DDEV](https://ddev.readthedocs.io) installs a [`.ddev/docker-compose.memcached.yaml`](docker-compose.memcached.yaml) using the `memcached` Docker image. |
| 20 | +After installation, make sure to commit the `.ddev` directory to version control. |
24 | 21 |
|
25 | | -## Interacting with Memcached |
| 22 | +## Usage |
26 | 23 |
|
27 | 24 | * The Memcached instance will listen on TCP port 11211 (the Memcached default). |
28 | 25 | * Configure your application to access Memcached on the host:port `memcached:11211`. |
29 | 26 | * To reach the Memcached admin interface, run `ddev ssh` to connect to the web container, then use `nc` or `telnet` to connect to the Memcached container on port 11211, i.e. `nc memcached 11211`. You can then run commands such as `stats` to see usage information. See [cheatsheet](https://lzone.de/cheat-sheet/memcached) for more commands. |
| 27 | + |
| 28 | +## Advanced Customization |
| 29 | + |
| 30 | +To change the docker image: |
| 31 | + |
| 32 | +```bash |
| 33 | +ddev dotenv set .ddev/.env.memcached --memcached-docker-image=memcached:1.6 |
| 34 | +ddev add-on get ddev/ddev-memcached |
| 35 | +ddev restart |
| 36 | +``` |
| 37 | + |
| 38 | +Make sure to commit the `.ddev/.env.memcached` file to version control. |
| 39 | + |
| 40 | +## Credits |
| 41 | + |
| 42 | +**Maintained by the [DDEV team](https://ddev.com/support-ddev/)** |
0 commit comments