前几天写的laravel-blog被老外看到了,然后问我了一个问题:
Why do we need Redis for a blog system? If this is truly a fast blog it should be fast just using a database, no?
我简单回单了一句,为了缓存,提高速度,结果他不依不饶:
Depends on the use case. What are we caching? Indexed queries in a relational database are usually very fast. Adding Redis makes for a more complex stack so it must be motivated. Are we not just talking about saving lower single-digit milliseconds here? And to do that we add a hard dependence on Redis, making hosting more complex, error-prone and expensive. I love Redis and use it when it's appropriate. I also love relational databases because they solve complex use cases in a performant way. I asked why it is motivated to add Redis for a blog engine, and I just get a hand-wavy "for caching" as an answer. What do we need to cache and why can't that problem be solved without the need for a Redis cache?
回答了一长串,具体看这里:here 截图:.
所以到底要不要缓存,我该怎么回答?强大的 V 友帮帮我
101
zong400 2016-09-28 11:55:23 +08:00
不需要,我的 blog 就用 hexo
|
102
henryhuangs 2016-09-28 12:37:41 +08:00
太多余了,我不知道访问量要到什么地步你才用
|