improve notes in ini
git-svn-id: svn://svn.lighttpd.net/xcache/trunk@927 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
This commit is contained in:
parent
5cef98310f
commit
70d0d2479b
|
@ -1,18 +1,22 @@
|
|||
;; 本文件只是例子, 请在 php.ini 里设置以便生效
|
||||
[xcache-common]
|
||||
;; 安装成 zend extension (推荐), 路径一般是 "$extension_dir/xcache.so"
|
||||
;; 警告: zend_extension* = *xcache* 必须是所有 zend_extension*=* 之中第一个出现
|
||||
;; 安装成 zend extension, 路径一般是 "$extension_dir/xcache.so"
|
||||
;; 不推荐使用 extension=xcache.so
|
||||
|
||||
;; 非 windows 例子
|
||||
;; install as zend extension, normally "$extension_dir/xcache.so"
|
||||
zend_extension = /usr/local/lib/php/extensions/non-debug-non-zts-xxx/xcache.so
|
||||
;; Windows 系统例子:
|
||||
zend_extension_ts = c:/php/extensions/php_xcache.dll
|
||||
;; 或者您也可把 XCache 安装成 extension, 注意确保您的 extension_dir 设置正确, 并把 xcache.so 或者 php_xcache.dll 放到该目录里面
|
||||
; extension = xcache.so
|
||||
;; 或者 Win32 系统:
|
||||
; extension = php_xcache.dll
|
||||
;; 对于新版本 PHP, _ts 后缀已经移除, 请使用下面这行
|
||||
zend_extension = c:/php/extensions/php_xcache.dll
|
||||
|
||||
[xcache.admin]
|
||||
xcache.admin.enable_auth = On
|
||||
xcache.admin.user = "mOo"
|
||||
; xcache.admin.pass = md5($您的密码)
|
||||
; 登录使用 $your_password
|
||||
xcache.admin.pass = ""
|
||||
|
||||
[xcache]
|
||||
|
@ -22,7 +26,7 @@ xcache.admin.pass = ""
|
|||
xcache.shm_scheme = "mmap"
|
||||
; 禁用: xcache.size=0
|
||||
; 启用: xcache.size=64M 之类 (任意>0的值) 同时请注意您的系统 mmap 上限
|
||||
xcache.size = 0M
|
||||
xcache.size = 60M
|
||||
; 建议设置为 cpu 数 (cat /proc/cpuinfo |grep -c processor)
|
||||
xcache.count = 1
|
||||
; 只是个参考值, 您可以放心地存储多于此数量的项目(php脚本/变量)
|
||||
|
@ -33,22 +37,20 @@ xcache.ttl = 0
|
|||
xcache.gc_interval = 0
|
||||
|
||||
; 同上, 只是针对变量缓存设置
|
||||
xcache.var_size = 0M
|
||||
xcache.var_size = 4M
|
||||
xcache.var_count = 1
|
||||
xcache.var_slots = 8K
|
||||
; 默认, 允许 ini_set()
|
||||
; xcache_*() 函数 ttl 参数的默认值
|
||||
xcache.var_ttl = 0
|
||||
; 最大ttl值
|
||||
; 限制 xcache_*() 函数 ttl 参数不超过此设置. 0=不限制
|
||||
xcache.var_maxttl = 0
|
||||
xcache.var_gc_interval = 300
|
||||
|
||||
; 仅测试用
|
||||
xcache.test = Off
|
||||
; /dev/zero 时无效
|
||||
xcache.readonly_protection = Off
|
||||
; 对于 *nix 系统, xcache.mmap_path 是文件路径而不是目录, (可以不存在 但是必须能创建).
|
||||
; 如果您期望启用 ReadonlyProtection, 可以使用类似 "/tmp/xcache"
|
||||
; 2 个 php 组不会共享同一个 /tmp/xcache
|
||||
; 对于 *nix 系统, xcache.mmap_path 是文件路径而不是目录. (自动创建/覆盖)
|
||||
; 如果您期望启用 ReadonlyProtection, 必须避免使用 "/dev/*", 可以使用类似 "/tmp/xcache"
|
||||
; 不同 php 进程组不会共享同一个 /tmp/xcache
|
||||
; 对于 Win32 系统, xcache.mmap_path=匿名MAP名字, 不是文件路径. 建议使用 XCache 字眼避免跟其他软件冲突
|
||||
xcache.mmap_path = "/dev/zero"
|
||||
|
||||
|
@ -58,15 +60,22 @@ xcache.mmap_path = "/dev/zero"
|
|||
; 注意该目录应该能被 php 写入文件 (跟 open_basedir 无关)
|
||||
xcache.coredump_directory = ""
|
||||
|
||||
; 启用实验性功能 (如果有)
|
||||
xcache.experimental = Off
|
||||
|
||||
; per request settings. 可以 ini_set, .htaccess 等
|
||||
xcache.cacher = On
|
||||
xcache.stat = On
|
||||
xcache.optimizer = Off
|
||||
|
||||
[xcache.coverager]
|
||||
; 本功能开启后降低运行性能
|
||||
; 尽在 xcache.coverager == On && xcache.coveragedump_directory == "非空值" 时本功能才会启用
|
||||
|
||||
; 如果 xcache.coveragedump_directory 设置为空则本设置自动为 Off
|
||||
; per request settings. 可以 ini_set, .htaccess 等
|
||||
; 启用代码流程覆盖面信息采集以及 xcache_coverager_start/stop/get/clean() 等函数
|
||||
xcache.coverager = Off
|
||||
|
||||
; 仅在 php ini 文件内设置
|
||||
; 请确保本目录能被 coverage viewer 脚本读取 (注意 open_basedir)
|
||||
; 依赖于 xcache.coverager=On
|
||||
xcache.coveragedump_directory = ""
|
||||
|
|
46
xcache.ini
46
xcache.ini
|
@ -1,18 +1,21 @@
|
|||
;; this is an example, it won't work unless properly configured into php.ini
|
||||
[xcache-common]
|
||||
;; install as zend extension (recommended), normally "$extension_dir/xcache.so"
|
||||
;; WARNING: zend_extension* = *xcache* MUST be the first(above) of all zend_extension*=*
|
||||
;; using extension=xcache.so is not recommended
|
||||
|
||||
;; non-windows example
|
||||
;; update xxx accordingly
|
||||
zend_extension = /usr/local/lib/php/extensions/non-debug-non-zts-xxx/xcache.so
|
||||
; zend_extension_ts = /usr/local/lib/php/extensions/non-debug-zts-xxx/xcache.so
|
||||
;; For windows users, replace xcache.so with php_xcache.dll
|
||||
;; windows example:
|
||||
zend_extension_ts = c:/php/extensions/php_xcache.dll
|
||||
;; or install as extension, make sure your extension_dir setting is correct
|
||||
; extension = xcache.so
|
||||
;; or win32:
|
||||
; extension = php_xcache.dll
|
||||
;; for newer PHP, _ts is removed, use the following line instead
|
||||
zend_extension = c:/php/extensions/php_xcache.dll
|
||||
|
||||
[xcache.admin]
|
||||
xcache.admin.enable_auth = On
|
||||
xcache.admin.user = "mOo"
|
||||
; xcache.admin.pass = md5($your_password)
|
||||
; set xcache.admin.pass = md5($your_password)
|
||||
; login use $your_password
|
||||
xcache.admin.pass = ""
|
||||
|
||||
[xcache]
|
||||
|
@ -36,16 +39,17 @@ xcache.gc_interval = 0
|
|||
xcache.var_size = 4M
|
||||
xcache.var_count = 1
|
||||
xcache.var_slots = 8K
|
||||
; default ttl
|
||||
; default value for $ttl parameter of xcache_*() functions
|
||||
xcache.var_ttl = 0
|
||||
; hard limit ttl that cannot be exceed by xcache_*() functions. 0=unlimited
|
||||
xcache.var_maxttl = 0
|
||||
xcache.var_gc_interval = 300
|
||||
|
||||
; N/A for /dev/zero
|
||||
xcache.readonly_protection = Off
|
||||
; for *nix, xcache.mmap_path is a file path, not directory.
|
||||
; Use something like "/tmp/xcache" if you want to turn on ReadonlyProtection
|
||||
; 2 group of php won't share the same /tmp/xcache
|
||||
; for *nix, xcache.mmap_path is a file path, not directory. (auto create/overwrite)
|
||||
; Use something like "/tmp/xcache" instead of "/dev/*" if you want to turn on ReadonlyProtection
|
||||
; different process group of php won't share the same /tmp/xcache
|
||||
; for win32, xcache.mmap_path=anonymous map name, not file path
|
||||
xcache.mmap_path = "/dev/zero"
|
||||
|
||||
|
@ -54,20 +58,22 @@ xcache.mmap_path = "/dev/zero"
|
|||
; make sure it's writable by php (open_basedir is not checked)
|
||||
xcache.coredump_directory = ""
|
||||
|
||||
; per request settings
|
||||
; enable experimental documented features for each release if available
|
||||
xcache.experimental = Off
|
||||
|
||||
; per request settings. can ini_set, .htaccess etc
|
||||
xcache.cacher = On
|
||||
xcache.stat = On
|
||||
xcache.optimizer = Off
|
||||
|
||||
xcache.test = Off
|
||||
xcache.experimental = Off
|
||||
|
||||
[xcache.coverager]
|
||||
; per request settings
|
||||
; enable coverage data collecting for xcache.coveragedump_directory and xcache_coverager_start/stop/get/clean() functions (will hurt executing performance)
|
||||
; enabling this feature will impact performance
|
||||
; enable only if xcache.coverager == On && xcache.coveragedump_directory == "non-empty-value"
|
||||
|
||||
; per request settings. can ini_set, .htaccess etc
|
||||
; enable coverage data collecting and xcache_coverager_start/stop/get/clean() functions
|
||||
xcache.coverager = Off
|
||||
|
||||
; ini only settings
|
||||
; set in php ini file only
|
||||
; make sure it's readable (open_basedir is checked) by coverage viewer script
|
||||
; requires xcache.coverager=On
|
||||
xcache.coveragedump_directory = ""
|
||||
|
|
Loading…
Reference in New Issue