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 http://pecl.php.net/packages/wincache/.

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 http://www.iis.net/expand/WinCacheForPhp.

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.

Note:

  • 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 http://pecl.php.net/package/wincache/. 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.

Thanks!

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!

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

  1. 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.

    Cheers

  2. @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.

  3. 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.

    Cheers

  4. @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.

Leave a Reply

Your email address will not be published. Required fields are marked *