博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Memcache 查看列出所有key的方法
阅读量:7126 次
发布时间:2019-06-28

本文共 912 字,大约阅读时间需要 3 分钟。

一个不错的列出memcache中所有key的方法,在某些场景下非常有用:

In the general case, there is  that a  instance is storing. You can, however, list something like the first 1Meg of keys, which is usually enough during development. Here’s how:

Telnet to your server:

telnet 127.0.0.1 11211

List the items, to get the slab ids:

stats items

STAT items:3:number 1

STAT items:3:age 498

STAT items:22:number 1

STAT items:22:age 498

END

The first number after ‘items’ is the slab id. Request a cache dump for each slab id, with a limit for the max number of keys to dump:

stats cachedump 3 100

ITEM views.decorators.cache.cache_header..cc7d9 [6 b; 1256056128 s]

END

stats cachedump 22 100

ITEM views.decorators.cache.cache_page..8427e [7736 b; 1256056128 s]

END

Thanks to Boris Partensky in the Memcached group 

There you go!

原文:http://www.darkcoding.net/software/memcached-list-all-keys/

本文转自 古道卿 51CTO博客,原文链接:http://blog.51cto.com/gudaoqing/1400114

转载地址:http://teeel.baihongyu.com/

你可能感兴趣的文章
学习python的第二天
查看>>
深入详解SQL中的Null
查看>>
c#国际化
查看>>
java代码Calendar类
查看>>
java多线程实现礼花绽放的效果,
查看>>
算法提高 道路和航路 SPFA 算法
查看>>
POJ2449 第K短路
查看>>
【最小割】【网络流24题】【P2762】 太空飞行计划问题
查看>>
Mysql触发器示例
查看>>
解决Asp.net中的Chart控件运行出现错误提示“ ChartImg.axd 执行子请求时出错”
查看>>
PHPExcel类导出xlsx文件 提示格式不兼容 低版本excel软件打不开 解决方案
查看>>
Android开发规范
查看>>
心已落定,入驻博客园
查看>>
paper 84:机器学习算法--随机森林
查看>>
Python自动化运维之26、Web框架本质、MVC与MTV
查看>>
样式表的样式
查看>>
雨燕框架启动流程
查看>>
spring,mapper的参数
查看>>
Java通过NIO实现快速文件拷贝的代码
查看>>
怎么样启用红米手机5的ROOT权限
查看>>