Repository navigation
Add Redis cache store for distributed deployment - #1751
Conversation
|
你可以引入一个 embedded-redis 并且scope设置为 testOnly,然后编写一个 RedisCacheStoreTest 单元测试以帮助我们更好的验证其正确性,并作为以后代码改动的基准线 |
@JohnNiang 只有比较简陋的测试流程 1、备份原博客 |
@guqing 加上了,有啥不对的地方你们那边应该可以直接改吧 |
Refactor unit test case for redis cache store
JohnNiang
left a comment
There was a problem hiding this comment.
Thanks for your first contribution!
LGTM
|
hi @luoxmc, Congrats on merging your first pull request! 🎉🎉🎉 |
|
@guqing 刚刚仔细看了下代码,可能还是有点错误, 所以对应的单元测试类也需要修改 |
是的 你提醒的很对,如果redis是和其他系统共享的toMap就不正确,不过目前 toMap只用来遍历数据过滤到想要的,所以目前不会出错,run.halo.app.controller.content.auth.ContentAuthentication 在该类中有一个 |
* add new cache way - redis * Optimize redis operation * Remove public from CacheWrapper class * add redis cache unit test * refactor: test case for redis cache store Co-authored-by: guqing <1484563614@qq.com>
增加新的缓存处理方式 - redis缓存
以解决分布式部署halo时后台经常需要重新登陆的问题
关联issue地址 https://github.com/halo-dev/halo/issues/1505