WinCache Extension 1.0 for PHP – Release to Web

The Windows Cache Extension 1.0 for PHP – RTW is available for download. This is a final, production-ready release that is provided under an open source BSD license with the source code hosted and maintained on

Install the Windows Cache Extension 1.0 for PHP – RTW

To install the Windows Cache Extension for PHP 5.2 and PHP 5.3, use the download links at the extension’s home page at

The installation with Web Platform Installer is the easiest as it will automatically place the extension binary into proper location and will update the PHP configuration to enable the extension. Also, if you have the beta or RC release of the extension installed, then Web PI will upgrade it. If you install any PHP application by using Web PI then the Windows Cache Extension for PHP will be offered as an optional component.

If you install the extension manually, then follow the instructions at Installing/Configuring WinCache for PHP.


  • The extension can only be used with non-thread-safe builds of PHP
  • The extension can only be used when IIS is configured to run PHP via FastCGI
  • The Windows Cache Extension 1.0 for PHP 5.3 can only be used with the x86 VC9 build of PHP 5.3.

Getting support

The WinCache extension is not supported by Microsoft Product Support Services. Instead it is supported as any other community PHP extension via the forums, mailing lists and the PECL bugs database. Use the following resources:

Getting the extension source code

The source code for the extension is available at For the instructions on how to build the extension yourself refer to Building WinCache Extension.

Bug fixes and changes since the RC release:

Here is the list of changes and bug fixes that have been made since the RC release of WinCache. For the complete list of WinCache features and configuration options refer to the WinCache documentation:

  • Added new INI directive wincache.fcenabledfilter that can be used to turn on/off file cache for individual IIS sites.
  • Fixed a bug that caused include_once() function to load file twice because relative file path was case insensitive.
  • Changed cache size default values. Default size of file cache is 32 MB and opcode cache is 96 MB.
  • Changed minimum and maximum values of file cache size and opcode cache size.
  • Added an auto adjustment of the opcode cache size to ensure it is at least 3 times bigger than file cache size.
  • Fixed several bugs in cache scavenger logic that caused access violations and crashes in php-cgi.exe processes.
  • Fixed a bug in exception handling that caused php-cgi.exe process to crash.
  • Modified the charts in wincache.php to display the numbers rounded to 2 digits after decimal point.
  • Fixed the wincache.php authenticaiton logic to not conflict with IIS built-in authentication.
  • Added memory usage pie charts to wincache.php file.
  • Updated the wincache.php to show a warning if opcode cache size is too small and it has been automatically increased.
  • wincache.php will now display entries in opcode cache, file cache and relative path cache in lexicographical sorted way.


WinCache Team thanks all of you who have installed and tried early releases of WinCache extension and provided us with feedback, bug reports and feature suggestions through the Windows Cache Extension for PHP Forum. Your involvement throughout the release process has been very valuable to us and really helped us make this a great release!


ruslany on November 19th 2009 in PHP

PoorFairAverageGoodExcellent (No Ratings Yet)

6 Responses to “WinCache Extension 1.0 for PHP – Release to Web”

  1. Gravatar ImageTweets that mention WinCache Extension 1.0 for PHP – Release to Web | RuslanY Blog -- responded on 19 Nov 2009 at 4:04 pm #

    [...] This post was mentioned on Twitter by Ruslan Yakushev, kjsingla. kjsingla said: Changes made to WinCache between RC and RTW release. [...]

  2. Gravatar ImageIvo responded on 20 Nov 2009 at 12:14 am #

    we’ve run some benchmarks on WinCache and the results look very promising:

    great work Ruslan!

  3. Gravatar ImageWill responded on 24 Nov 2009 at 7:01 pm #

    How does this affect the use of Output Caching in IIS7? Is this a replacement or can I use both to help reduce server load?

    I suppose I’m just confused about what exactly Output Caching in IIS7 does.


  4. Gravatar Imageruslany responded on 24 Nov 2009 at 7:14 pm #

    @Will: IIS Output Cache is used to cache the response produced by the web application so that next time a request comes for the same page, the web application code is not even invoked. For some dynamic web applications that is acceptable, but for others it may be not. For example on my blog I have a post views counter that updates the database table everytime a post or a page is requested. If I used IIS output cache, then this counter would not work, because the request would never reach the PHP code that updates the database.

    WinCache is a PHP opcode cache, which caches the compiled PHP code in memory so that next time a request comes for a page, the code is not recompiled but instead is just fetched from memory. The code will be still executed for every request. In my blog case that means that the post views counter will be updated on every page request.

    You can use both caches at the same time. But usually, if you are fine with limitations of opcode cache and decide to enable it, then there is no need to use opcode cache. It will not matter how fast PHP scripts execute because requests will be served from IIS output cache anyway.

  5. Gravatar ImageWill responded on 30 Nov 2009 at 1:48 pm #

    Thanks for the quick reply.

    I am using WinCache now and its the best ive seen. I had used APC and eaccelerator for some time, but they were very unstable on Windows/Apache.

    Before WinCache, i had output caching on for all of my WordPress/php websites, but honestly i never saw any performance improvement.

    Do you have any suggestions for tweaking WinCache? I noticed that I had to greatly increase the # of instances of fast-cgi with WinCache enabled. It was set to 4 and now is set to 15. Ive still not seen over 70% cpu usage.


  6. Gravatar Imageruslany responded on 30 Nov 2009 at 10:17 pm #

    @Will: It is expected that after enabling WinCache it may be necessary to increase maxInstances setting in FastCGI. This article explains why. If after increasing the number of instances you still see only 70% CPU usage under maximum load then you can try increasing the number even more.

Trackback URI | Comments RSS

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

XML Markup: If You want to add XML code to the comment please XML encode it first, otherwise the code will not show up.

Recently Published Articles