Memcached Storing session
1. Session data needs to be called frequently.
2, session data does not need to be permanently saved on the server.
3, in the cluster, the session can be stored in the memcached or in the database, you can do the user login stored in a server problem. Implementing session Sharing
Implementation session stored in memcached
1, when compiling php memcached extension, the internal implementation of a session processor, Session.save_handler
<?php ini_set (' Session.save_handler ', ' memcache '); The processor configured for the session is memcached Ini_set (' Session.save_path ', ' tcp://127.0.0.1:11211;tcp://127.0.0.1:11212 '); You can specify multiple addresses for the memcached that hold the session. Memcached Cluster to store session session_start (); The following is the normal operation session//NOTE: If you use the Telnet client to see the value of the session, the Memcached key is session_id (); >
Memecached Storing session data