How to test memcached in PHP

不言
Release: 2023-04-02 12:14:01
Original
2508 people have browsed it

This article mainly introduces the method of testing memcached in PHP, which has certain reference value. Now I share it with everyone. Friends in need can refer to it

1.memcached generates key

 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; ?>
Copy after login

2.mecached delete key

 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; ?>
Copy after login

The above is the entire content of this article. I hope it will be helpful to everyone’s learning. For more related content, please pay attention to PHP Chinese net!

Related recommendations:

Introduction to installing xhprof for performance analysis in PHP 7.1

php How to add the instant push function

The above is the detailed content of How to test memcached in PHP. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!