Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

351
Views
¿Cómo eliminar el objeto de la lista Redis?

Estoy usando la función de eliminación en un escenario para la eliminación de caché de datos de mongodb pero ingrese la descripción de la imagen aquí ¿Cómo puedo eliminar datos que son objetos específicos de redis? Usé Lrem() pero no funcionó, les agradecería si pudieran ayudarme.

 const deleteComment = async (req, res) => { let key = `Comments/${req.query.postId}`; try { const deleteValue = await Comment.findOneAndDelete({ _id: req.params.id, $or: [{ writer: req.user.id }, { authorId: req.user.id }], }) .populate("responseTo", "writer") .populate("postId", "authorId") .populate("writer"); const jsonData = JSON.stringify(deleteValue); await client.lRem(key, 0, jsonData); res .status(200) .json({ success: true, message: "Comment Deleted", ıtem: deleteValue }); } catch (err) { res.status(500).json({ message: err }); } };
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!