Skip to content

Commit 5b901c7

Browse files
2ndkauboyo-samaras
andauthored
Add a configuration example for Redis (#36)
* Add a configuration example for Redis With the StashPHP documentation, it was not clear how to use Redis. This adds an example on how to use Redis in combination with DDEV. * Update README.md Co-authored-by: Orestis Samaras <66624212+o-samaras@users.noreply.github.com> Signed-off-by: Bernhard Kau <github@kau-boys.de> --------- Signed-off-by: Bernhard Kau <github@kau-boys.de> Co-authored-by: Orestis Samaras <66624212+o-samaras@users.noreply.github.com>
1 parent 487b1d7 commit 5b901c7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,18 @@ WP_STASH_DRIVER=\Stash\Driver\FileSystem
9090
WP_STASH_DRIVER_ARGS='{"path":"\/var\/www\/cache","dirSplit":1}'
9191
```
9292

93-
Caching to a memcached server at `localhost`:
93+
Caching with a memcached server using the `memcached` host name (e.g. in DDEV):
9494
```
9595
WP_STASH_DRIVER=\Stash\Driver\Memcache
9696
WP_STASH_DRIVER_ARGS='{"servers":["memcached","11211"]}'
9797
```
9898

99+
Caching with a Redis server using the `redis` host name (e.g. in DDEV):
100+
```
101+
WP_STASH_DRIVER=\Stash\Driver\Redis
102+
WP_STASH_DRIVER_ARGS='{"servers":[{"server":"redis", "port":6379}]}'
103+
```
104+
99105
Don't cache persistently at all (cache lives only within the script lifetime):
100106
```
101107
WP_STASH_DRIVER=\Stash\Driver\Ephermal

0 commit comments

Comments
 (0)