WinCache, or the Windows Cache Extension for PHP, is a PHP accelerator that is used to significantly increase the speed of PHP applications running on Windows Server IIS. Besides increasing the speed of PHP applications, WinCache decreases CPU usage making it a win win situation extension. I’ve described how to run PHP with WinCache on IIS in an earlier post.
This post is about WinCache’s advantages for WordPress on Windows Server IIS.
The PHP loading time and MySQL queries statistics in the footer of a WordPress site might show:
Stats: 31 queries in 0.914 seconds, running PHP version 7.0.4 & Wincache Stats: 34 queries in 0.381 seconds, running PHP version 7.0.4 & Wincache Stats: 31 queries in 0.162 seconds, running PHP version 7.0.4 & Wincache Stats: 31 queries in 0.149 seconds, running PHP version 7.0.4 & Wincache
Pretty well, but still 31 queries for a vanilla WordPress site with only a few plugins.
To effectively use WinCache, there is a drop-in plugin available: WinCache Object Cache Backend. You can drop the
object-cache.php file in your
wp-content/ folder, to utilize WinCache’s object cache mode, a persistent memory-based backend for the WordPress object cache.
Now the statistics show:
Stats: 12 queries in 0.149 seconds, running PHP version 7.0.4 & Wincache Stats: 12 queries in 0.125 seconds, running PHP version 7.0.4 & Wincache Stats: 12 queries in 0.124 seconds, running PHP version 7.0.4 & Wincache Stats: 12 queries in 0.126 seconds, running PHP version 7.0.4 & Wincache
WinCache’s object cache is where WordPress and WordPress plugins store the results of complex operations. On subsequent loads, the data can be fetched from the cache (memory), which will be much faster dan dynamically generating it on every page load. In this case, saving some 19 queries.
Note: this is an older post, moved from another blog of mine.
Please Support Saotn.org
Each post on Sysadmins of the North takes a significant amount of time to research, write, and edit. Therefore, your donation helps a lot! For example, a donation of $3 U.S. buys me a cup of coffee, and as you know: things jsut work better with coffee. A $10 U.S. donation buys me one month of web hosting (yes, hosting costs money). But seriously, thank you for any amount. Much appreciated!
Please donate to support this site if you found a post interesting or if it helped you solve a problem. Thanks! (Tip: no Paypal account required)