The headline may be a bit out of line with my article.
When I first approached Memcache, I thought:
Set the load balance when the session of the storage can be used memcache, so search the relevant information.
First, modify the following two configurations of PHP.ini
Session.save_handler = memcached
Session.save_path = "127.0.0.1:11211"
Restart Service PHP-FPM Restart
Then write a php file to store the next session to try
session.php
<?php
Session_Start ();
$_session[' username '] = ' honghong ';
This time back to the black box to see the memcache in the Sesiion
There's been some trouble here too ^ ^
Telnet 127.0.0.1 11211
I wanted to get straight, but it didn't work.
And then you think
Stats items//list memcache all keys
STAT Items:3:number 1
STAT Items:3:age 160
STAT items:3:evicted 0
STAT Items:3:evicted_nonzero 0
STAT Items:3:evicted_time 0
STAT Items:3:outofmemory 0
STAT Items:3:tailrepairs 0
STAT items:3:reclaimed 0
STAT items:3:expired_unfetched 0
STAT items:3:evicted_unfetched 0
STAT items:3:crawler_reclaimed 0
STAT items:3:crawler_items_checked 0
STAT items:3:lrutail_reflocked 0
STAT Items:7:number 1
STAT items:7:age 1350
STAT items:7:evicted 0
Then run the command
Stats cachedump 3 0//Enquiry 3 All information
Result ITEM Memc.sess.cqcmk19vs5fgp4um5976lj7cj0 [B; 1491547440 S]
This is the session. ^ ^
When you run the command
Get Memc.sess.cqcmk19vs5fgp4um5976lj7cj0
Results user|s:8: "Honghong"; The session is stored in the memcache to obtain
Memcache get key method, query session Store