-
Notifications
You must be signed in to change notification settings - Fork 563
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
optimize add cache first number page of post in custom configure #78
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job! 这么晚了,还在commit👍🏻
建议可以通过redis getset/setnx简单维护一个latestVersion(比如用时间戳),多实例部署的情况下,单实例不停轮询latestVersion(间隔可以小一点),如果latestVersion > localVersion,则本地重新生成缓存且更新localVersion。
这样应该可以省掉第2、3步。
我本地没有测,要是测过没问题的话就合入主干吧 |
已经抽象出 |
optimize #78 change CacheIndex in conf.yaml to SimpleCacheIndex
optimize #78 support disable expire cache index if needed
…rnal action event send
optimize #78 support custom configure ActionQPS
添加缓存泡泡广场前几页消息流的功能,优化前几页页面加载速度,也减轻后端数据库负担。可以按需启用缓存功能,开启方法为
在配置文件conf.yaml的 Features 节中添加
CacheIndex
功能。为什么添加前几页消息流缓存功能?
前几页消息流 是请求热点,通过缓存消息流来优化请求速度,同时也能减轻一点后端数据库的查询压力。目前实现是一个简单的立足单节点服务的版本,后续再优化完善。
实现缓存的思路是什么?