|
PHP技巧:使用APC缓存优化PHP程序(3) apc_define_constants - Defines a set of constants for later retrieval and mass-definition apc_delete - Removes a stored variable from the cache apc_fetch - Fetch a stored variable from the cache 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
apc的用法比较简单,只有几个函数,列举如下。
apc_cache_info () 返回缓存信息 apc_clear_cache() 清除apc缓存内容。 默认(无参数)时,只清除系统缓存,要清除用户缓存,需用‚user‘参数。 apc_define_constants ( string key, array constants [, bool case_sensitive] ) 将数组constants以常量加入缓存。 apc_load_constants (string Key)。 取出常量缓存。 apc_store ( string key, mixed var [, int ttl] )。 在缓存中保存数据。 apc_fetch ( string key )。 获得apc_store保存的缓存内容 apc_delete ( string key )。 删除apc_store保存的内容。
apc的管理:
到pecl.php.net下载apc源码包有个apc.php,copy到你的web server可以访问到的地方,浏览即可访问。
管理界面功能有: 1. Refresh Data 2. View Host Stats 3. System Cache Entries 4. User Cache Entries 5. Version Check

|