• 请不要在回答技术问题时复制粘贴 AI 生成的内容
lufficc
V2EX  ›  程序员

一个问题,博客需不需要 Redis?

  •  
  •   lufficc · Sep 25, 2016 · 15090 views
    This topic created in 3696 days ago, the information mentioned may be changed or developed.

    前几天写的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 友帮帮我

    104 replies  •  2017-04-20 14:12:38 +08:00
    1  2  
    ❮ ❯
    ethsol
    ethsol
    Sep 28, 2016
    101
    不需要,我的 blog 就用 hexo
    henryhuangs
    henryhuangs
    Sep 28, 2016
    102
    太多余了,我不知道访问量要到什么地步你才用
    abc123ccc
    abc123ccc
    Dec 19, 2016
    103
    @kideny 我的小站也被攻击过,目前不知道是 3M 的流量攻击还是被拦截后的 3M 。目前运行稳定。
    superlead
    superlead
    Apr 20, 2017
    104
    @mokeyjay 弱弱地问一下 这个爆炸是多爆炸?
    1  2  
    ❮ ❯
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1652 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 13:30 · PVG 21:30 · LAX 05:30 · JFK 08:30
    ♥ Do have faith in what you're doing.