dougui4325 2010-11-30 08:56
浏览 25
已采纳

使用PHP检查memcache集群中是否存在密钥

I'm debugging the caching layer of a PHP application. It uses a cluster of memcache servers to cache values. I want to verify that a specific object gets purged correctly.

My idea was to connect to the right memcache server with telnet and check manually if the key exists. I know the key that is passed to Memcache::set, but not which server to connect to. How do I know on which memcache server the data gets stored?

  • 写回答

3条回答 默认 最新

  • drrvnbwle80177811 2010-11-30 09:35
    关注

    I just referenced the docs. Memcached clients hash the key to determine which sever to query. So, I guess Memcached IS sharded. You will probably have to look at the source of a client (or maybe the docs) to see how the hashing->sever is done. Otherwise you could just use a client from command line to query for the value.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器