Transferred from www.5iphp.com
Memcache: getversion
StringMemcache: getversion(Void)
Note:
Returns the version information of the running memcache instance. Same Function memcache_get_version ()
Return Value:
The version of the server is
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 database tutorials.It can cope with any
PHP Caching principleWhen the client requests a PHP program, the server's PHP engine parses the PHP program and compiles it into a specific opcode (operatecode, abbreviated opcode) file, which is a binary representation of the PHP code. By default,
Server environment, Centos6.51. Installing the memcached serverYum-y Install memcached2. Configure Memcached Server users and auto-start services, etc.Configure the service as self-booting chkconfig --level 2345 memcached on3. Configure the
During PHP operation, the PHP engine will process the PHP source code (lexical analysis, parsing, etc.) and then generate opcode.And then run it again. At this stage can be opcode cache up, when the next need to run the program, it avoids the
1, PHP file cache content Save formatPHP file cache Content storage format is mainly three kinds:(1) Variable var_export formatted into PHP normal assignment writing format;(2) The variable serialize is stored after serialization and is deserialized
If a large number of visits to the database will cause a lot of burden, so for the change does not often content to do well PHP data cache (cache) is very necessary, I made a simple php "file caching" class, I hope to help.
The idea is this:
For
Caching technology is widely used in practical use, which can effectively reduce the access pressure of server database and improve the running speed. At present, many CMS content management systems frequently use caching mechanism to improve the
Nginx Cache
Nginx has two types of caching mechanisms: Fastcgi_cache and Proxy_cache
Let's talk about the difference between the two caching mechanisms.
The Proxy_cache function is to cache the contents of the backend server, possibly any content,
This function mainly uses the file modification time function filemtime and the current time-frame subtraction method to determine whether to update the content.
This function mainly uses the file modification time function filemtime and the
In php5.2, output_buffering is disabled by default. When you run the following three lines of code, a Warning is displayed: Warning: Cannotmodifyheaderinformation.
In php5.2, output_buffering is disabled by default. When you run the following three
Opcache (full Zend Opcache):Starting with php5.5, the default php script cache extension, compiled php5.5 with parameter--enable-opcache can be compiled Opcache, but must be configured to enable.Principle:In fact, it's very simple, opcache just
The following is a detailed summary of the cache technology in php. For more information, see
Static page cachingThat is, generate all html static pages. the static pages accessed by users are not parsed by the php server. This method is common in
This function mainly uses the file modification time function filemtime and the current time-frame subtraction method to determine whether to update the content.
The code is as follows:
// This function uses the file modification time function
In general, the purpose of caching is to put data in one place to make access faster, without a doubt, memory is the fastest, but hundreds of m of data can be stored inside it? This is unrealistic, of course, sometimes temporarily placed as a server
The cache is widely used in practice, which can reduce the access to the server database and improve the running speed. At present, many CMS content management systems frequently use caching mechanism to improve the efficiency of system operation.
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.