Complete parsing of basic Memcache functions in PHP and complete parsing of memcache
What is Memcache?
Memcache is a danga.com project that was first used for LiveJournal. Many people around the world use this cache project to build their own websites with high load to share the pressure on databases.
It can cope with any number of connections and use non-blocking network I/O. Because its working mechanism is to open up a space in the memory, and then create a HashTable, Memcached self-manages these HashTable.
Official website of Memcache: http://www.danga.com/memcached. For more detailed information, see here :)
Why are there two Memcache and memcached names?
In fact, Memcache is the name of this project, and memcached is the name of the main program file on its server ~~~~. One is the project name, the other is the main program file name, and many people on the Internet do not understand it, so it is mixed.
The Memcache module provides convenient process-oriented and object-oriented interfaces for Memcached. Memcached is a resident process cache product generated to reduce the workload of Dynamic web applications loading data from databases. The Memcache module also provides a session processor (memcache ). The following PHP programmer Lei xuesong will explain in detail how PHP operates the basic Memcache functions.
Memcache-Memcache class
Memcache: add-add an entry to the Cache Server
Memcache: addServer-Add a memcache server to the connection pool
Memcache: close-close memcache connection
Memcache: connect-open a memcached server connection
Memcache: decrement-Reduce key Value
Memcache: delete-delete a key from the server
Memcache: flush-clean (delete) All keys that have been stored
Memcache: get-check a key from the server
Memcache: getExtendedStats-statistics on all servers in the cache server pool
Memcache: getServerStatus-used to obtain the online/offline status of a server
Memcache: getStats-Get server statistics
Memcache: getVersion-the server version is returned.
Memcache: increment-Add a key value
Memcache: pconnect-open a persistent connection to the server
Memcache: replace-replace the value of an existing key
Memcache: set-storage value. No key is added and the existing key is replaced directly.
Memcache: setCompressThreshold-Enable Automatic Compaction
Memcache: setServerParams-Modify server parameters and status during runtime
Memcache function memcache_debug-switch debug output on/off
The above section describes the basic functions of Memcache operations in PHP. I hope this will be helpful to you. If you have any questions, please leave a message and I will reply to you in a timely manner. Thank you very much for your support for the help House website!