1, win under installation, memcached-d install
Win under Start, memcached-d start
Close, memcached-d stop
1_1, three ways to access memcache
Memcache
Memcached
PHP (not dependent on extended socket operation)
2, Memcache extension (function) = = = Access to the cache system.
Installing the Memcache extension (c-Compiled dynamic-link library)
; Enable Memcache Extension
Extension=php_memcache.dll
3, the service side start memcached service
4, the definition of class in PHP ,
Create a file Person.class.php
Require "Person.class.php" in the file used, introducing the definition
5, Memcache can store and get a variety of PHP data types
string int float Boolean Array object (after serialization) null resource (for example: MySQL connection is not put into memcache)
How resource can be put in, can be used as a connection pool.
6, the scope of Memcache/session/cookie is different.
Cookies in each browser, save the product that visits the site, browse what,
Session associates a file with a session on the Web server, saving the login information. The respective user can only access their session.
To count the solutions for accessing users online (when the database cannot be used):
Scenario One: Traverse the number of session files
Scenario Two: memcached shared cache (recommended)
7, the system uses multiple Memcache systems (multiple components of distributed storage) memcache self-balancing multiple memcached servers
8, do the core technology of large-scale website
1) page static
2) cache (memcache////)
8-1, the characteristics of memcached
1. Is the C/s architecture, using simple text to communicate. Multiple Client access available
2. Based on Libevent event processing (Java needs to handle a variety of monitoring, PHP is not listening)
3. Memory-based caching, faster.
4. Distributed based on the customer.
9, the reference memcache various processing, writes own cache system!!!!
http://www.bkjia.com/PHPjc/327602.html www.bkjia.com true http://www.bkjia.com/PHPjc/327602.html techarticle 1, win under installation, memcached-d install win under Start, memcached-d start off, memcached-d stop 1_1, three ways to access memcache memcache memcached php (not dependent on extended so ...