The OB cache for PHP

Source: Internet
Author: User

(1) OB cache response Process

If the OB cache is open, the echo data is first placed in the OB cache. If it is header information, put it directly in the program cache. When the page executes to the end, the data of the OB cache is placed in the program cache and returned to the browser in turn.

(3), How to open the Ob cache method

1. Add output_buffering=4096 to the php.ini file in the configuration file

Note:the OB cache is turned on by default after php5.3

2, add a sentence in the procedure Ob_start (); Turn on the OB cache

(4), several important OB functions:

Ob_get_contents (); Get OB cache data

Ob_clean (); Empties data from OB cache

Ob_end_clean (); Empties the OB cache data and closes the cache

Ob_flush (); Refresh (cut) The data in the OB cache to the program cache

Ob_end_flush (); Flushes (cuts) the OB cache data to the program cache and closes the OB cache


This article is from the "Born for the Dragon" blog, please be sure to keep this source http://v587bj4.blog.51cto.com/9579337/1763041

The OB cache for PHP

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.