三、PHP_APC函数
apc_add—缓存一个变量到数据存储
apc_bin_dump— Get a binary dump of the given files and user variables
apc_bin_dumpfile— Output a binary dump of cached files and user variables to a file
apc_bin_load— Load a binary dump into the APC file/user cache
apc_bin_loadfile— Load a binary dump from a file into the APC file/user cache
apc_cache_info— Retrieves cached information from APC''s data store
apc_cas— Updates an old value with a new value
apc_clear_cache—清除APC缓存
apc_compile_file— Stores a file in the bytecode cache, bypassing all filters.
apc_dec— Decrease a stored number
apc_define_constants— Defines a set of constants for retrieval and mass-definition
apc_delete_file— Deletes files from the opcode cache
apc_delete—从用户缓存中删除某个变量
apc_exists—检查APC中是否存在某个或者某些key
apc_fetch—从缓存中取出存储的变量
apc_inc—递增一个储存的数字
apc_load_constants— Loads a set of constants from the cache
apc_sma_info— Retrieves APC''s Shared Memory Allocation information
apc_store— Cache a variable in the data store
四、PHPAPC使用
使用apc缓存的示例(test_apc_cache.php):
复制代码 代码如下:
<?php
error_reporting(E_ALL);
classapcInit {
/**
*Apc缓存-设置缓存
*设置缓存key,value和缓存时间
*@par