XCache is a fast, stable PHP opcode cacher that has been proven and is now running on production servers under high load.
https://xcache.lighttpd.net/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
81 lines
2.8 KiB
81 lines
2.8 KiB
;; 本文件只是例子, 请在 php.ini 里设置以便生效 |
|
[xcache-common] |
|
;; 警告: 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 |
|
;; 对于新版本 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] |
|
; 这里的多数选项仅在 ini 里可以修改, 这里列出的都是默认值, 除非另外说明 |
|
|
|
; select low level shm/allocator scheme implemenation |
|
xcache.shm_scheme = "mmap" |
|
; 禁用: xcache.size=0 |
|
; 启用: xcache.size=64M 之类 (任意>0的值) 同时请注意您的系统 mmap 上限 |
|
xcache.size = 60M |
|
; 建议设置为 cpu 数 (cat /proc/cpuinfo |grep -c processor) |
|
xcache.count = 1 |
|
; 只是个参考值, 您可以放心地存储多于此数量的项目(php脚本/变量) |
|
xcache.slots = 8K |
|
; 缓存项目的 ttl, 0=永久 |
|
xcache.ttl = 0 |
|
; 扫描过期项目的时间间隔, 0=不扫描, 其他值以秒为单位 |
|
xcache.gc_interval = 0 |
|
|
|
; 同上, 只是针对变量缓存设置 |
|
xcache.var_size = 4M |
|
xcache.var_count = 1 |
|
xcache.var_slots = 8K |
|
; xcache_*() 函数 ttl 参数的默认值 |
|
xcache.var_ttl = 0 |
|
; 限制 xcache_*() 函数 ttl 参数不超过此设置. 0=不限制 |
|
xcache.var_maxttl = 0 |
|
xcache.var_gc_interval = 300 |
|
|
|
; /dev/zero 时无效 |
|
xcache.readonly_protection = Off |
|
; 对于 *nix 系统, xcache.mmap_path 是文件路径而不是目录. (自动创建/覆盖) |
|
; 如果您期望启用 ReadonlyProtection, 必须避免使用 "/dev/*", 可以使用类似 "/tmp/xcache" |
|
; 不同 php 进程组不会共享同一个 /tmp/xcache |
|
; 对于 Win32 系统, xcache.mmap_path=匿名MAP名字, 不是文件路径. 建议使用 XCache 字眼避免跟其他软件冲突 |
|
xcache.mmap_path = "/dev/zero" |
|
|
|
|
|
; 仅用于 *nix 系统 |
|
; 设置为空(禁用) 或者类似 "/tmp/phpcore/" |
|
; 注意该目录应该能被 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 == "非空值" 时本功能才会启用 |
|
|
|
; per request settings. 可以 ini_set, .htaccess 等 |
|
; 启用代码流程覆盖面信息采集以及 xcache_coverager_start/stop/get/clean() 等函数 |
|
xcache.coverager = Off |
|
|
|
; 仅在 php ini 文件内设置 |
|
; 请确保本目录能被 coverage viewer 脚本读取 (注意 open_basedir) |
|
xcache.coveragedump_directory = ""
|
|
|