Alain Pilon

Joined

420 Experience
4 Lessons Completed
0 Questions Solved

Activity

I will be in a similar situation and my solution will either be to cache the mention or store it in redis using the sgid and set it to auto expire in a few hours. Avatar may be out of date for a short duration because of the cache but it is a small price to pay to reduce load on the DB.

Posted in Deleting Comments In Nested Threads Discussion

I use your approach, but if the comment has no parents, I simply delete the record. No reasons to keep it poluting the UI

logo Created with Sketch.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2021 GoRails, LLC. All rights reserved.