A brief analysis of PHP's apc extension (1)
I finally generated the apc.so extension file under php5.5, and I can’t wait to test apc. With the apc.so file, it is easy to make php support apc. Open the configuration file php in use. .ini, just add extension=apc.so, restart the web server (if using nginx, restart php-fpm) to make it take effect, and then use phpinfo() to check whether it has taken effect.
Before official use, we need to copy a file named apc.php in the source code folder of apc to the root directory of the website being used. This file displays various indicators of the current apc in the form of a web page. This allows us to observe the running process of apc more intuitively. There are only two places in this file that we need to change, one is the login account and the other is the login password. The purpose of the account and password will be explained in detail when used.
defaults('ADMIN_USERNAME','username'); // Admin Username defaults('ADMIN_PASSWORD','password'); // Admin Password - CHANGE THIS TO ENABLE!!!
First let's take a look at "View Host Stats". This option is used to display the host's statistical information, which is divided into "General Cache Information", Let's look at the "File Cache Information", "User Cache Information", "Runtime Settings", "Host Status Diagrams", and "Detailed Memory Usage and Fragmentation" one by one
"General Cache Information": About. An overall introduction to apc cache, including a series of information such as apc version, php version, apc host information, etc.
"File Cache Information": Describes system cache-related information. If conditions permit, apc will automatically cache all files. When the user visits the visited PHP page again, the cache file will be read first, and the detailed information of the cache file is recorded in "System Cache Entries". Here is a statistics on the system cache, Cached Files. (Number and size of cached files), Hits (number of cache hits), Misses (number of cache misses), Request Rate (hits, misses) (request rate, including hits and misses), Hit Rate (request hit rate), Miss Rate (request miss rate), Insert Rate (unknown), Cache full count (number of times the cache exceeds the upper limit). Through this information, we can understand the hit status of the system cache, whether the cache content exceeds the upper limit, and then make corresponding adjustments according to the situation.
“User Cache Information”: Describes user cache related information. Different from system cache, user cache requires users to manually store and call with the help of apc_add, apc_store, app_fetch and other functions. Cached Variables (number and size of cached variables), other information descriptions have the same meaning as the descriptions in the system cache.
Summary:
1 The apc.php file needs to change the user name and password
2 APC has two major functions: system cache - automatically cache php files, user cache - manual cache php variables
3 Cached Files( Variables) can let us know the number and size of cached variables. Rate related parameters let us know the request hit rate. Cache full count lets us know that the memory allocated for apc is not enough and needs to be adjusted.
The above has introduced a brief analysis of PHP's apc extension (1), including various aspects. I hope it will be helpful to friends who are interested in PHP tutorials.

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

In this chapter, we will understand the Environment Variables, General Configuration, Database Configuration and Email Configuration in CakePHP.

PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

To work with date and time in cakephp4, we are going to make use of the available FrozenTime class.

To work on file upload we are going to use the form helper. Here, is an example for file upload.

In this chapter, we are going to learn the following topics related to routing ?

CakePHP is an open-source framework for PHP. It is intended to make developing, deploying and maintaining applications much easier. CakePHP is based on a MVC-like architecture that is both powerful and easy to grasp. Models, Views, and Controllers gu

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c

Validator can be created by adding the following two lines in the controller.
