Skip to content

Commit 20ca62a

Browse files
authored
Remove FAQ section in readme (#382)
Old and outdated questions about Redis clients where using the official client documentation is recommended. #379
1 parent 2cbf45f commit 20ca62a

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

readme.md

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -124,29 +124,5 @@ interface Serializer {
124124

125125
Value used for _count_ parameter in [Redis `SCAN` command](https://redis.io/commands/scan#the-count-option). Used for `ids()` and `all()` methods (default: `100`).
126126

127-
## FAQ
128-
129-
#### How to log Redis errors?
130-
131-
```js
132-
client.on("error", console.error)
133-
```
134-
135-
#### How do I handle lost connections to Redis?
136-
137-
By default, the Redis client will [auto-reconnect](https://github.com/mranney/node_redis#overloading) on lost connections. But requests may come in during that time. In Express, one way you can handle this scenario is including a "session check":
138-
139-
```js
140-
app.use(session(/* setup session here */))
141-
app.use(function (req, res, next) {
142-
if (!req.session) {
143-
return next(new Error("oh no")) // handle error
144-
}
145-
next() // otherwise continue
146-
})
147-
```
148-
149-
If you want to retry, here is [another option](https://github.com/expressjs/session/issues/99#issuecomment-63853989).
150-
151127
[1]: https://github.com/NodeRedis/node-redis
152128
[2]: https://github.com/luin/ioredis

0 commit comments

Comments
 (0)