时间:2021-07-01 10:21:17 帮助过:22人阅读
1.memcached生成key
<?php $nemcache = new memcached; $memcache -> connetct('192.168.1.10') or die ("Could not connect Memcached Server"); $memcache -> set ('key','Connect Memcached Server sussucfull'); $get = $memcache -> get('key'); echo $get; ?>
2.mecached删除key
<?php $nemcache = new memcached; $memcache -> connetct('192.168.1.10') or die ("Could not connect Memcached Server"); //$memcache -> set ('key','Connect Memcached Server sussucfull'); //设置 //$memcache -> replace('key','New Connect Memcached Server sussucfull'); $memcache -> delete('key'); //删除 $get = $memcache -> get('key');//查询 echo $get; ?>
以上就是本文的全部内容,希望对大家的学习有所帮助,更多相关内容请关注PHP中文网!
相关推荐:
PHP 7.1安装xhprof进行性能分析的介绍
php 如何加入即时推送的功能
以上就是PHP测试memcached 的方法的详细内容,更多请关注Gxl网其它相关文章!