skip to Main Content

Mongoose redis caching

https://medium.com/@haimrait/how-to-add-a-redis-cache-layer-to-mongoose-in-node-js-a9729181ad69 In this guide. So I mostly do queries like { id: <guild id> } so whenever new document is created. const book = new Book({ title, content, author }); try { await book.save(); clearKey(Book.collection.collectionName); res.send(book); } catch (err) {…

VIEW QUESTION

MongooseError – Operation `users.findOne()` buffering timed out after 10000ms – Twitter API

My code was working before initially but I don't know why it just stopped working and gave me this error: MongooseError: Operation `users.findOne()` buffering timed out after 10000ms at Timeout.<anonymous> (/Users/nishant/Desktop/Yourfolio/backend/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js:184:20) at listOnTimeout (internal/timers.js:549:17) at processTimers (internal/timers.js:492:7) I am trying…

VIEW QUESTION
Back To Top
Search