Rodrigo Farcas
Active member
Does Xenforo play well with OpCache?
Yes, it seems to work fine with the Zend opcache included in PHP 5.5, so far as I've seen.Does Xenforo play well with OpCache?
http://massivescale.blogspot.com/2013/06/php-55-zend-optimiser-opcache-vs-xcache.htmland XCache v/s OpCache? Any comparisons available?
How do I verify it is working?
Oh, nice. Got a decent GUI and can see my files are being cached.There are a number of GUIs for Zend Opcache around which will show you cache status (Google: Zend Opcache GUI)
I've used an older version of this simple script on my servers for a while now - https://github.com/rlerdorf/opcache-status ... haven't kept up on what other scripts can do, so there might be something better out here, but this one is very easy to set up.
Oh, nice. Got a decent GUI and can see my files are being cached.
Should this reduce the number of database calls? Because debugging shows that there is the same number of calls now as there was before I put the caching in place.
Hmm.. I've already configured a Memcache, but that does not seem to be affecting the database call count whatsoever.No, opcache only pre-compiles the scripts into opcode for the PHP engine to execute and keeps them in memory ... it only saves the time taken to read the PHP scripts from disk and compile them.
If your web server runs on SSDs, the benefit from the opcache isn't as dramatic as it might be from a slower HDD based system, but every little bit helps.
If you want to minimise database calls, you'll need to implement an APC or Memcache cache as described here: https://xenforo.com/help/cache/ ... this will allow the registry data to be read from memory rather than from the database - thus saving on queries and speeding the entire site up.
Hmm.. I've already configured a Memcache, but that does not seem to be affecting the database call count whatsoever.
Do you know why that would be the case? Little concerned things aren't working as they should be
I assume you meant Memcached:you'll need to implement an APC or Memcache cache
I assume you meant Memcached:
http://memcached.org/
$config['cache']['enabled'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions'] = array(
'caching' => true,
'automatic_serialization' => true,
'lifetime' => 10800,
'cache_id_prefix' => 'xf_'
);
We use essential cookies to make this site work, and optional cookies to enhance your experience.