We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6235b24 commit 32d0be1Copy full SHA for 32d0be1
README.md
@@ -111,6 +111,19 @@ const client = new Redis({ host: 'localhost', port: 6379 })
111
fastify.register(require('@fastify/redis'), { client })
112
```
113
114
+You can also supply a *Redis Cluster* instance to the client:
115
+
116
+```js
117
+'use strict'
118
119
+const fastify = require('fastify')()
120
+const Redis = require('ioredis')
121
122
+const client = new Redis.Cluster([{ host: 'localhost', port: 6379 }]);
123
124
+fastify.register(require('@fastify/redis'), { client })
125
+```
126
127
Note: by default, *@fastify/redis* will **not** automatically close the client
128
connection when the Fastify server shuts down.
129
0 commit comments