启动memcached:./memcached -d -m 10 -l 127.0.0.1 -p 11211 -u root

连接memcached:telnet 127.0.0.1 11211

查看memcached所有key:stats items

结果:

  STAT items:16:number 1
  STAT items:16:age 195
  STAT items:16:evicted 0
  STAT items:16:evicted_nonzero 0
  STAT items:16:evicted_time 0
  STAT items:16:outofmemory 0
  STAT items:16:tailrepairs 0
  STAT items:16:reclaimed 0
  STAT items:16:expired_unfetched 0
  STAT items:16:evicted_unfetched 0

stats cachedump 16 0    (注:16:items id, 0:列出的长度,0为全部列出)

结果:

  ITEM menuList:menu [2333 b; 1406639276 s]
  END
  (注:menuList:menu 为key)

查看数据:get key

get menuList:menu

结果:

VALUE menuList:menu 8 2333
{"v":{"java.util.ArrayList":[{"com.brin.util.model.menu.MenuVO":{"pageSize":10,"totalRows":0,"curPage":1,"start":0,"end":10,"sord":null,"totalPages":0,"id":1,"menuName":"首页","menuComment":"首页","parentId":-1,"orderMenu":1,"initUrl":"","pathUrl":"","active":"Y","children":0}},{"com.brin.util.model.menu.MenuVO":{"pageSize":10,"totalRows":0,"curPage":1,"start":0,"end":10,"sord":null,"totalPages":0,"id":2,"menuName":"事务","menuComment":"事务","parentId":-1,"orderMenu":2,"initUrl":"","pathUrl":"","active":"Y","children":0}},{"com.brin.util.model.menu.MenuVO":{"pageSize":10,"totalRows":0,"curPage":1,"start":0,"end":10,"sord":null,"totalPages":0,"id":3,"menuName":"日志","menuComment":"日志","parentId":-1,"orderMenu":3,"initUrl":"","pathUrl":"","active":"Y","children":0}},{"com.brin.util.model.menu.MenuVO":{"pageSize":10,"totalRows":0,"curPage":1,"start":0,"end":10,"sord":null,"totalPages":0,"id":4,"menuName":"用户","menuComment":"用户","parentId":-1,"orderMenu":4,"initUrl":"","pathUrl":"","active":"Y","children":0}},{"com.brin.util.model.menu.MenuVO":{"pageSize":10,"totalRows":0,"curPage":1,"start":0,"end":10,"sord":null,"totalPages":0,"id":5,"menuName":"事务1","menuComment":"事务1","parentId":2,"orderMenu":1,"initUrl":"url","pathUrl":"","active":"Y","children":0}},{"com.brin.util.model.menu.MenuVO":{"pageSize":10,"totalRows":0,"curPage":1,"start":0,"end":10,"sord":null,"totalPages":0,"id":6,"menuName":"事务2","menuComment":"事务2","parentId":2,"orderMenu":2,"initUrl":"","pathUrl":"","active":"Y","children":0}},{"com.brin.util.model.menu.MenuVO":{"pageSize":10,"totalRows":0,"curPage":1,"start":0,"end":10,"sord":null,"totalPages":0,"id":7,"menuName":"日志1","menuComment":"日志1","parentId":3,"orderMenu":1,"initUrl":"","pathUrl":"","active":"Y","children":0}},{"com.brin.util.model.menu.MenuVO":{"pageSize":10,"totalRows":0,"curPage":1,"start":0,"end":10,"sord":null,"totalPages":0,"id":8,"menuName":"事务1_1","menuComment":"事务1_1","parentId":5,"orderMenu":1,"initUrl":" ","pathUrl":" ","active":"Y","children":0}},{"com.brin.util.model.menu.MenuVO":{"pageSize":10,"totalRows":0,"curPage":1,"start":0,"end":10,"sord":null,"totalPages":0,"id":9,"menuName":"首页1","menuComment":"首页1","parentId":1,"orderMenu":1,"initUrl":" ","pathUrl":" ","active":"Y","children":0}}]}}
END

memcached笔记的更多相关文章

  1. Memcached 笔记与总结(8)Memcached 的普通哈希分布算法和一致性哈希分布算法命中率对比

    准备工作: ① 配置文件 config.php ② 封装 Memcached 类 hash.class.php,包含普通哈希算法(取模)和一致性哈希算法 ③ 初始化 Memcached 节点信息 in ...

  2. Memcached 笔记与总结(7)增加虚拟节点

    仅仅把 Memcached 服务器集群地址通过一致性哈希转映射在圆环上,可能会出现数据不能均匀地分配给各台 Memcached 服务器. 解决方案是引入虚拟节点,就是把每个映射在圆环上的服务器地址(物 ...

  3. Memcached笔记——(四)应对高并发攻击【转】

    http://snowolf.iteye.com/blog/1677495 近半个月过得很痛苦,主要是产品上线后,引来无数机器用户恶意攻击,不停的刷新产品各个服务入口,制造垃圾数据,消耗资源.他们的最 ...

  4. Memcached笔记——(四)应对高并发攻击

    近半个月过得很痛苦,主要是产品上线后,引来无数机器用户恶意攻击,不停的刷新产品各个服务入口,制造垃圾数据,消耗资源.他们的最好成绩,1秒钟可以并发6次,赶在Database入库前,Cache进行Mis ...

  5. Memcached笔记——(三)Memcached使用总结

    为了将N个前端数据同步,通过Memcached完成数据打通,但带来了一些新问题: 使用iBatis整合了Memcached,iBatis针对每台server生成了唯一标识,导致同一份数据sql会产生不 ...

  6. Memcached笔记——(二)XMemcached&Spring集成

    今天研究Memcached的Java的Client,使用XMemcached 1.3.5,做个简单的测试,并介绍如何与Spring集成. 相关链接: Memcached笔记--(一)安装&常规 ...

  7. Memcached笔记——(一)安装&常规错误&监控

    08年的时候接触过Memcached,当时还对它的客户端产品嗤之以鼻,毕竟手工代码没有各种ORM原生XML配置方便.尽管如此,Memcached现在已经成了服务器架构里不可或缺的一部分! 相关链接: ...

  8. Memcached 笔记与总结(9)Memcached 与 Session

    一.Memcached 存储 Session 由于 Memcached 是分布式的内存对象缓存系统,因此可以用来实现 Session 同步:把 Web 服务器中的内存组合起来,成为一个“内存池”,不管 ...

  9. Memcached 笔记与总结(5)Memcached 的普通哈希分布和一致性哈希分布

    普通 Hash 分布算法的 PHP 实现 首先假设有 2 台服务器:127.0.0.1:11211 和 192.168.186.129:11211 当存储的 key 经过对 2 (2 台服务器)取模运 ...

  10. Memcached 笔记与总结(4)memcache 扩展的使用

    在 wamp 环境下进行测试:WAMPSERVER 2.2(Windows 7 + Apache 2.2.21 + PHP 5.3.10 + memcache 3.0.8 + Memcached 1. ...

随机推荐

  1. ListView与RecyclerView对比浅析——缓存机制

    https://www.jianshu.com/p/193fb966e954 一,背景 RecyclerView是谷歌官方出的一个用于大量数据展示的新控件,可以用来代替传统的ListView,更加强大 ...

  2. redis哨兵(Sentinel)、虚拟槽分区(cluster)和docker入门

    一.Redis-Sentinel(哨兵) 1.介绍 Redis-Sentinel是redis官方推荐的高可用性解决方案,当用redis作master-slave的高可用时,如果master本身宕机,r ...

  3. android O 打开设置->声音->“点按时震动问题”

    主要原因是和导航栏和屏幕最下方3个按键的属性配置有关,因为在PhoneWindowManager中调用方法performHapticFeedbackLw(null, HapticFeedbackCon ...

  4. VScode中python环境配置

    vscode中python环境配置 想要在vscode中运行python代码必须要告诉vscode使用哪个解释器才行 方法1. 打开命令面板(Ctrl+Shift+P)输入Python: Select ...

  5. CF993D Compute Power(二分+Dp)

    一看到这种求\(min/max\left \{ \frac{\sum a_i}{\sum b_i} \right \}\)的题肯定是\(01\)分数规划,大概可以算作一种二分? 设\(ans\)为当前 ...

  6. Linux安装Tomcat8

    前置条件 安装jdk,见参考文章 下载Tomcat8 先从tomcat网站上下载最新的.gz安装包 tomcat官网下载地址 在下面找到Linux对应的tomcat安装包 我下载的文件名是:apach ...

  7. Python并发编程之IO模型

    目录 IO模型介绍 阻塞IO(blocking IO) 非阻塞IO(non-blocking IO) IO多路复用 异步IO IO模型比较分析 selectors模块 一.IO模型介绍 Stevens ...

  8. <二>ELK-6.5.3学习笔记–使用rsyslog传输管理nginx日志

    http://www.eryajf.net/2362.html 转载于 本文预计阅读时间 28 分钟 文章目录[隐藏] 1,nginx日志json化. 2,发送端配置. 3,接收端配置. 4,配置lo ...

  9. 应用调试(四)系统调用SWI

    目录 应用调试(四)系统调用SWI 系统调用 SWI代码片段分析 分析sys_write 构造sys_hello 应用程序调用SWI 嵌入汇编语法 测试APP 参考 title: 应用调试(四)系统调 ...

  10. Hadoop记录-queue mysql

    #!/bin/sh ip=10.116.100.11 port=8088 export HADOOP_HOME=/app/hadoop/bin rmstate1=$($HADOOP_HOME/yarn ...