Fixed crash in Redis adapter when storeConfig is not provided#27003
Fixed crash in Redis adapter when storeConfig is not provided#27003muratcorlu wants to merge 2 commits into
Conversation
WalkthroughThis change enhances the Redis cache adapter's error handling and documentation. The implementation adds JSDoc support for an optional 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
When storeConfig was omitted from the Redis cache adapter config, the retryStrategy callback would throw a TypeError whenever ioredis tried to reconnect to Redis, crashing Ghost instead of recovering gracefully. Fixed by using optional chaining on config.storeConfig.
338487c to
8ceae11
Compare
|
Hi @allouis Since you are already working on Redis Adapter, can you also have a look at this? Simple fix but I think it's nice to handle that null check to avoid application crashes. |
|



When storeConfig was omitted from the Redis cache adapter config, the retryStrategy callback would throw a TypeError whenever ioredis tried to reconnect to Redis, crashing Ghost instead of recovering gracefully. Fixed by using optional chaining on config.storeConfig.
Also fixed missing (config.username) JSDoc definition.
Got some code for us? Awesome 🎊!
Please take a minute to explain the change you're making:
Please check your PR against these items:
We appreciate your contribution! 🙏