How to use sessioncookiememcache? What is the difference? -Php Tutorial

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.