49

通用点赞设计思路

 5 years ago
source link: https://juejin.im/post/5bfb72cce51d4576c64d5de3
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
点赞作为一个高频率的操作,如果每次操作都读写数据库会增加数据库的压力,所以采用缓存+定时任务来实现。点赞数据是在redis中缓存半小时,同时定时任务是每隔5分钟执行一次,做持久化存储,这里的缓存时间和任务执行时间可根据项目情况而定。 优点 1.降低对数据库的影

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK