drzk21632
2011-01-29 08:11 阅读 38

具有LRU到期的内存高速缓存

I am looking for an in memory cache for my PHP powered website. It is not high traffic website, I just want to cache data and parts of some pages for improving performance. The data size will vary from a few bytes to few kBs. I am currently using xCache, and have no problem with it.

Is it better to switch to memcached or redis? Are there any better options?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

2条回答 默认 最新

  • 已采纳
    doumuyu0837 doumuyu0837 2011-01-29 08:14

    If you don't have any obvious problem, why do wanna switch right now? Memcached or redis are probably better but if you don't need them right now, it is better to leave them. As long as your caching strategy is sound and cache interface is abstracted you should be able to add them later when you actually feel the need to switch to a scalable cache.

    Also xCache in PHP is an opcoder cache.. Memcache & redis are more or less like a out of proc key Value pair.. If your site is running on 2 or 3 server and you need the context b.w them shared not just kept individual instances, those caches will help.

    --Sai

    点赞 评论 复制链接分享
  • dqwolwst50489 dqwolwst50489 2011-01-29 08:14

    Personally, I use APC, because I already use it for Opcode Caching. This way I have to maintain fewer things. Another reason for me to use APC is, that it is planned to be included in the next PHP version, so I feel more "stable" on it.

    Though obviously: You should change your caching system, just for the sake of changing it ;) If XCache doesn't make any problems, you probably should just keep it.

    点赞 评论 复制链接分享

相关推荐