Windows Cache Extension 1.0 for PHP – Beta

Today IIS team has released the beta of the Windows Cache Extension 1.0 for PHP. The Windows Cache Extension for PHP is a PHP accelerator, that is used to increase the speed of PHP applications running on the Windows operating systems. Any PHP application can take advantage of the functionality provided by the Windows Cache Extension for PHP without any code modifications. All that is required is that the extension is enabled and loaded by the PHP engine.

Install the Windows Cache Extension 1.0 for PHP – Beta

wpibadgesilver

or, download:

Windows Cache Extension 1.0 for PHP 5.2 – Beta

Windows Cache Extension 1.0 for PHP 5.3 – Beta

Follow the instructions at “Using Windows Cache Extension for PHP” to install, enable and configure the extension.

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.

Benefits and Features

The extension includes three caches that can be enabled or disabled independently of each other:

  • PHP opcode cache – PHP is a script processing engine, which reads an input stream of data that contains text and/or PHP instructions and produces another stream of data, most commonly in the HTML format. This means that on a web server the PHP engine reads, parses, compiles and executes a PHP script each time that it is requested by a Web client. The reading, parsing and compilation operations put additional load on the web server’s CPU and file system and thus affect the overall performance of a PHP web application. The PHP bytecode (opcode) cache is used to store the compiled script bytecode in shared memory so that it can be re-used by PHP engine for subsequent executions of the same script.
  • File cache – Even with the PHP bytecode cache enabled, the PHP engine has to access the script files on a file system. When PHP scripts are stored on a remote UNC file share, the file operations introduce a significant performance overhead. The Windows Cache Extension for PHP includes a file cache that is used to store the content of the PHP script files in shared memory, which reduces the amount of file system operations performed by PHP engine.
  • Relative file path cache – PHP scripts very often include or operate with files by using relative file paths. Every relative file path has to be converted to an absolute file path by the PHP engine. When a PHP application uses many PHP files and accesses them by relative paths, the operation of resolving relative paths to absolute paths may negatively impact the application’s performance. The Windows Cache Extension for PHP provides a relative file path cache, which is used to store the mappings between relative and absolute file paths, thereby reducing the number of relative path resolutions that the PHP engine has to perform.

More information

Use the Windows Cache Extension for PHP Forum to ask questions, report bugs and provide feature suggestions.

11,917 views

ruslany on September 1st 2009 in PHP

PoorFairAverageGoodExcellent (3 votes, average: 5.00 out of 5)

9 Responses to “Windows Cache Extension 1.0 for PHP – Beta”

  1. Gravatar ImageFestuc responded on 02 Sep 2009 at 12:58 pm #

  2. Gravatar ImageRuslanY Blog responded on 02 Sep 2009 at 5:31 pm #

    Windows Cache Extension for PHP and CPU usage…

    The FastCGI module in IIS has a configuration setting maxInstances, which controls the number of concurrently running php-cgi.exe processes that IIS creates to process PHP requests. To achieve optimal performance, it is recommended to fine tune this se…

  3. Gravatar ImageWeekly Web Nuggets #74 : Code Monkey Labs responded on 03 Sep 2009 at 9:19 am #

    [...] Windows Cache Extensions 1.0 for PHP – Beta: PHP on IIS7 just gets better and better.Ruslan Yakushev announces the beta release of a drop-in PHP accelerator for Windows. Be sure to check out his post about increasing the number of PHP instances, too. [...]

  4. Gravatar ImageCommunity News: PHP Cache Accelerator for Windows | Webs Developer responded on 04 Sep 2009 at 6:01 am #

    [...] works with the Web Platform Installer and IIS versions 7.5, 7.0, 6.5 and 5.1. Ruslan Yakushev has blogged a bit more information about the extension noting that it only works with non-thread-safe builds of PHP and IIS needs to [...]

  5. Gravatar ImageCommunity News: PHP Cache Accelerator for Windows | PHP responded on 04 Sep 2009 at 9:00 am #

    [...] works with the Web Platform Installer and IIS versions 7.5, 7.0, 6.5 and 5.1. Ruslan Yakushev has blogged a bit more information about the extension noting that it only works with non-thread-safe builds of PHP and IIS needs to [...]

  6. Gravatar ImageJamal Zhalka responded on 06 Oct 2009 at 4:10 am #

    Hi

    can I use this with IIS cache , or this extension is enough for the job

  7. Gravatar Imageruslany responded on 06 Oct 2009 at 10:55 am #

    @Jamal: IIS Cache and WinCache are two different things. IIS Cache is a static cache – it caches the output of the PHP script so that for next request the cached version is served without even involving PHP into the request. This has its drawbacks because with IIS cache you loose the dynamic nature of the PHP application. For example if you have a page counter on your HTML page or if somebody submits a comment to the blog – user will not see any changes to the page until the IIS Cache refreshes.
    WinCache is different in that it does not cache the output of the PHP scrtipt, but instead it caches the compiled PHP code so that it takes less time for subsequent requests to be processed. Because of that you do not loose any of the dynamic features of you PHP application.
    If you do not want to loose the dynamic features then you should use WinCache without IIS Cache. If that is not too important then you can try IIS Cache. You can use them together also.

  8. Gravatar ImageCMI Web Studio - Blog responded on 18 Oct 2009 at 1:37 pm #

    [...] [...]

  9. Gravatar ImageRuslanY Blog responded on 19 Oct 2009 at 10:56 pm #

    Windows Cache Extension 1.0 for PHP – RC…

    The Windows Cache Extension 1.0 for PHP – Release Candidate is available for download. The release contains functionality and stability improvements and it is believed to have the quality level suitable for production deployments.
    Install the Win…

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