我花了很多时间来获得wincache工作,因为我在Symfony 2中的应用程序在我的Windows 8(初始化时间> 2s)上速度很慢。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,请帮助我的错误,或给我功能wincache扩展在这里为PHP5.5 VC11 NTS版本,thx!
发布于 2014-06-04 07:32:35
我也有同样的问题,所以我在WinCache 论坛上询问,结果是函数reroute函数已经删除了一段时间,而没有更新文档。太可惜了。
发布于 2015-03-03 18:25:44
是的,由于应用程序的原因,wincache.rerouteini设置很早就被禁用了。
但是,在WinCache 1.3.7.1中添加了一种新的重路由支持形式。它不再接受单独的.ini文件。默认情况下,重路由是打开的。
PHP5.4:http://sourceforge.net/projects/wincache/files/development/wincache-1.3.7.1-dev-5.4-nts-vc9-x86.exe/download php5.5:http://sourceforge.net/projects/wincache/files/development/wincache-1.3.7.1-dev-5.5-nts-vc11-x86.exe/download php5.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
https://stackoverflow.com/questions/23591406
复制相似问题