Nginx + WordPress + HHVM: Why isn’t Batcache working? Would Varnish help even more?

I guess the answer is that HHVM does not work with typical opcode caching, the compiler is not the same as “regular” PHP’s. HHVM has it’s own opcode caching that as far as I know does not integrate with APC or Zend’s OPcache, it does it’s own thing. In other words, it would be redundant.

You can read about it in detail here: http://hhvm.com/blog/4061/go-faster (comparison with APC).

You can however use HHVM’s caching with memcached ( at least I think you can) there are several issues and patches on HHVM’s github about this, https://github.com/facebook/hhvm

I have never used HHVM but there must be a way to test or debug the cache, that is probbaly your best route, plugins that take advantage of “regular” PHP like batcache will not show anything.

To test if it’s working turn off HHVM caching ( I think the settings are found under runtime options) and test the site with it off/on or with different cache settings.

Another option is to just define('WP_CACHE', true) in your wp-config.php file, and you can benchmark HHVM with this off/on and see if it has any effect.

You can see here a compatible list of PHP extensions that work with HHVM: https://github.com/facebook/hhvm/tree/master/hphp/runtime/ext

Leave a Comment