PHP Memcache Detailed and simple application (_php) tutorial

Source: Internet
Author: User
Brief introduction:

Memcached is a high-performance, distributed memory object caching system. It is often used to reduce the load on the database tutorials to improve the responsiveness of dynamic Web applications.

This extension uses the APIs provided by the Libmemcached library to interact with the memcached service side. It also provides a session processor (memcached). It also provides a session processor


More information about libmemcached can be viewed in http://libmemcached.org/libmemcached.html.

Memcache Requirements:

This extension requires the Libmemcached client library.

Memcache Installation:

Information related to installing this pecl extension can be found in the installation section titled PECL Extensions in the manual. Additional information, such as new releases, downloads, source files, additional information such as new releases, maintenance personnel information and change logs, are here: http://pecl.php Tutorial. net/package/ Memcached.

If libmemcached is installed in a non-standard path, use--with-libmemcached-dir=dir to specify the path, dir is the prefix parameter when the libmemcached is installed. This path needs to contain the file include/libmemcached/memcached.h.

If you want to support compression, you need to zlib. For non-standard installed zlib libraries, use--with-zlib-dir=dir to specify the zlib installation path, dir is the prefix parameter for ZIB installation.

The session processor support is turned on by default. If you want to turn it off, use the option--disable-memcached-session.

Pre-defined constants:

The following constants are defined by this extension and are available only when the extension is compiled into PHP or dynamically loaded at run time.

Memcached::opt_compression
Turn on or off the compression function. When the value of item exceeds a certain threshold (currently 100bytes) when it is turned on, the value is first compressed and then stored, and then decompressed and returned when the value is fetched, making the compression transparent to the application layer.

Type: Boolean, default: True.

Memcached::opt_serializer
Specifies the serialization tool for serializing non-scalar values. The available values are memcached::serializer_php and memcached::serializer_igbinary. The latter only works when the--enable-memcached-igbinary option is turned on memcached configuration and the igbinary extension is loaded.

Type: Integer, default: memcached::serializer_php.

memcached::serializer_php
The default PHP serialization tool (that is, the Serialize method).

1 2

http://www.bkjia.com/PHPjc/444795.html www.bkjia.com true http://www.bkjia.com/PHPjc/444795.html techarticle Summary: Memcached is a high-performance, distributed memory object caching system. It is often used to reduce the load on the database tutorials to improve the responsiveness of dynamic Web applications. This extension makes ...

  • Related Article

    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.