Skip to content
This repository was archived by the owner on Oct 13, 2025. It is now read-only.

Commit e302aa7

Browse files
committed
fix: immediately set redisClient
This makes sure you're immiediately able to access the redisClient object and don't need to wait for the ready event.
1 parent d533687 commit e302aa7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/redisClient.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ export default function redisClient() { // eslint-disable-line no-unused-vars
1616
});
1717
const client = redis.createClient(redisOptions);
1818

19+
app.set('redisClient', client);
20+
1921
client.on('ready', () => {
2022
app.set('redisClient', client);
2123
if (cacheOptions.env !== 'test') {

0 commit comments

Comments
 (0)