How to use sessioncookiememcache? What is the difference? For php beginners, how do I use session cookie memcache? Under what circumstances? What is the difference? Thank you for your help.
Reply to discussion (solution)
Memcached is a high-performance distributed memory cache server. The general purpose is to reduce the number of database accesses by caching database query results, so as to speed up dynamic web applications and improve scalability.
Features
1. simple protocol
2. libevent-based event processing
3. built-in memory storage
4. distributed memcached non-communication
Session is used to maintain the user's status information on the Web server for access from any page at any time. Session information is stored on the server.
Cookie can keep the login information to the user's next session with the server. the Cookie information is stored locally
Session and Cookie are used to save the private data of the visitor. The former is saved on the server, and the latter is saved in the browser.
Memcached is used to save public data (variables and objects) and exchange data between different program instances.
Memcache can be used as data cache
Http://hi.baidu.com/fdwm_lx/item/e314ebf72e901cdc6225d2d1
To put it simply:
Session is saved on the server.
Cookie is saved on the client.
Session is safer than cookie.
Cookies do not occupy system resources.
I will study memcache again.
You only need to know that the cookie is saved on the client, and the stored data is small, about 4 kB.
The Session is stored on the server, and the size is basically unlimited.
Http://blog.chinaunix.net/uid-20778583-id-301990.html
I am dull. I have not understood this article.
Analysis and analysis