XenForo + caching = AMAZING

I am using this:
PHP:
$config['cache']['enabled'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions'] = array(
    'caching'                  => true,
    'automatic_serialization'  => true,
    'lifetime'                  => 1800,
    'cache_id_prefix'          => 'xf2_'
);
#Memcached
$config['cache']['backend']='Memcached';
$config['cache']['backendOptions']=array(
      'compression'=>false,
      'servers' => array(
              array(
                  'host'=>'localhost',
                  'port'=>11211,
              )
        )
);
$config['cache']['cacheSessions'] = true;

I've added this into config.php and after forum refresh i'm getting blank page with this error:

An unexpected error occurred. Please try again later.

And error log says that Zend_Cache_Exception: The memcache extension must be loaded for using this backend ! - library/Zend/Cache.php:209

Solution?
 
Last edited:
I've added this into config.php and after forum refresh i'm getting blank page with this error:
And error log says that Zend_Cache_Exception: The memcache extension must be loaded for using this backend ! - library/Zend/Cache.php:209
Solution?
Make sure that memcache/memcached are loaded in your PHP processor and that the memcached daemon is running?
 
Is there anyone who knows the solution for this. My host cannot get memcached to work. It is installed but it is not showing in phpinfo
 
To elucidate further, he is running a VPS with WHM/cPanel. It DOES show as installed (I even SSH'd into his system to confirm memcached was installed and running - it is, and that the memcache module was installed - it's listed in the php.ini).
He's using centOS and Apache with fcgi as the php processor.
The "simple" routine of clicking the correct buttons apparently isn't working. What's weird is that his php info page does not show geoIP module installed, but apparently it is working (I saw where it was installed in the apache setup as a module).

Does memcache (and related type modules) need to be installed in apache also on a WHM/cPanel setup?
I'll be the first to admit I hate panels for this reason. Several instructions showed to install memcached PECL also, but when you select it there are apparently outstanding dependencies that are not met and the compile does not complete.


EDIT:

This is now fixed... turns out the existing php.ini had a bad string in it and was not being read.

After fixing the string here is what now shows up.
Screen Shot 2014-06-09 at 9.11.39 AM.webp
 
Last edited:
My Zend opcache keeps refreshing every 15-20 mins or so. I tried APCu with it but xenforo wont use it :(

Does anyone know how to keep zendopcache from refreshing every now and then? I have turned on piped logging aswell so its not apache restart and I am using Fcgi as handler. Any ideas? Or is this how it is supposed to be?

I am going to try installing memcached and see how it goes with zendopcache.

-------------------
Update: I installed Memcached and its working well.

Zendopcache+Memcached is a little faster then APC but my problem of zendopcache refersing every 20-30 mins is still not resolved so I would appreciate if some one could tell me where to look for a solution.
 
Last edited:
These are the settings I have at the moment :

-------------

zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20121212/opcache.so"
opcache.enable=1
opcache.enable_cli=1
opcache.memory_consumption=10240
opcache.interned_strings_buffer=512
opcache.max_accelerated_files=50000
opcache.max_wasted_percentage=10
opcache.use_cwd=1
opcache.validate_timestamps=1
opcache.revalidate_freq=259200
opcache.fast_shutdown=1

-----------------

My opcache refresh problem is solved but it had nothing to do with the settings I had. I was using Fcgi and now I have removed that and use php-fmp using a plugin someone made for Cpanel. It has been up for days now without a refresh.
 
The newer php releases already have a very fast cache.

What the newer php releases do not have, is a user cache. You can use these user caches:
- memcache
- APCu. The regular APC consists of the cache mechanism that is already included into the newer php releases, plus the user cache. APCu means "APC, just the user cache from APC"

There is no need to enable them booth as xenforo only can use one of them, either APCu or memcache. If you have a single server, APCu is a bit faster (although more unreliable). If you use multiple servers, memcache is great as you can have an additional server just for memcache and every server can reach out to this dedicated cache server. That is not possible with APCu.
 
XenForo + Redis caching is GREAT! w/ @Xon addon (y)

OK, I will share my own experience also :).
15M post VB 4.2 Forum just converted on December 29 to XF 1.5.

k7xad3l.png
 
Top Bottom