我花了很多时间才能让wincache工作,因为我的Windows 8中的应用程序在我的Windows 8上很慢(初始化时间> 2秒)。在此创建的Wincache解决方案https://stackoverflow.com/a/9487264
安装了IIS并将其安装在phpinfo()中。但问题是我的申请仍然很慢。我试图搜索出错了,看起来reroute.ini没有加载到al,即使它在php.ini中
wincache.rerouteini="C:\Program Files (x86)\iis express\PHP\v5.5\reroute.ini"
但它在phpinfo()中缺失
我甚至查看了pecl上的源代码,我找到了
#ifdef WINCACHE_TEST
/* index 21 */ STD_PHP_INI_ENTRY("wincache.rerouteini", NULL, PHP_INI_SYSTEM, OnUpdateString, rerouteini, zend_wincache_globals, wincache_globals)
/* index 22 */ STD_PHP_INI_ENTRY("wincache.olocaltest", "0", PHP_INI_SYSTEM, OnUpdateBool, olocaltest, zend_wincache_globals, wincache_globals)
#endif
是什么意思?这意味着只有当常量WINCACHE_TEST为真时才会出现此选项?因为那从来没有,因为我也发现了这个
#ifdef WINCACHE_DEBUG
# define WINCACHE_TEST
# define _ASSERT(x) if(!(x)) { dprintalways(#x); if(IsDebuggerPresent()) { DebugBreak(); } }
#else
# define _ASSERT(x)
#endif
上面的代码
中注释了常量WINCACHE_DEBUG/* comment following line for release builds */
/* #define WINCACHE_DEBUG */
/* #define DEBUG_DUMP_OPARRAY */
这个错误吗?我只是想让reroute.ini(http://www.php.net/manual/en/wincache.reroutes.php)工作。那可以减少初始化时间4x的选项,请帮助我在那里做错了,或者在这里发送PHP5.5 VC11 NTS版本的函数wincache扩展,thx!
答案 0 :(得分:1)
我遇到了同样的问题,所以我在WinCache forums上询问,事实证明函数重新路由功能已被删除了一段时间,而没有更新文档。太糟糕了。
答案 1 :(得分:0)
是的,wincache.rerouteini设置很早就因app appat原因被禁用。
但是,在WinCache 1.3.7.1中添加了一种新形式的重新路由支持。它不再需要单独的.ini文件。重新启动默认情况下处于启用状态。
php 5.4:http://sourceforge.net/projects/wincache/files/development/wincache-1.3.7.1-dev-5.4-nts-vc9-x86.exe/download php 5.5:http://sourceforge.net/projects/wincache/files/development/wincache-1.3.7.1-dev-5.5-nts-vc11-x86.exe/download php 5.6:http://sourceforge.net/projects/wincache/files/development/wincache-1.3.7.1-dev-5.6-nts-vc11-x86.exe/download
这个私有包装了10个PHP函数,它们可以从首先查看WinCache文件缓存中受益。功能是:
默认情况下,重新启动/绕行处于启用状态。如果你做需要将其关闭:
wincache.reroute_enabled = 0