Xenforo cache

zonzon

Member
My question is about XF cache https://xenforo.com/docs/xf2/cache/

If I will activate general cache like this with Memcached or Redis:
Code:
$config['cache']['enabled'] = true;
$config['cache']['provider'] = 'Memcached';
$config['cache']['config'] = [    'server' => '127.0.0.1' ];

this will include all Cache contexts icluding ?
The following cache contexts are used by default in XenForo 2.1:
  • css
  • page
  • registry
  • sessions

or I need activate each of them separately?
 

Anatoliy

Well-known member
I need activate each of them separately?
yep

here is what I have for page cache

Code:
$config['cache']['enabled'] = true;
$config['pageCache']['enabled'] = true;
$config['cache']['context']['page']['provider'] = 'Redis';
$config['cache']['context']['page']['config'] = ['host' => '127.0.0.1'];
 

djbaxter

Well-known member
yep

here is what I have for page cache

Code:
$config['cache']['enabled'] = true;
$config['pageCache']['enabled'] = true;
$config['cache']['context']['page']['provider'] = 'Redis';
$config['cache']['context']['page']['config'] = ['host' => '127.0.0.1'];
What exactly is that doing, especially the first two entries? Does that refer to the "default Xenforo cache", whatever and whereever that is, or is it specific to Redis?
 

Anatoliy

Well-known member
What exactly is that doing, especially the first two entries? Does that refer to the "default Xenforo cache", whatever and whereever that is, or is it specific to Redis?
yeah, exactly that - it enables default Xenforo cache using redis for that.
 

zonzon

Member
And if you don't use Redis? Do you need some sort of server cache enabled and configured?
Good question. You can use XF cache without redis. Redis one from many cache servers (If I right).
Yes you will need some other cache server if you will enable XF cache.

But I dont understand XF general cache including all Cache contexts or not.
 

Anatoliy

Well-known member
And if you don't use Redis? Do you need some sort of server cache enabled and configured?
Redis IS "some sort of server cache". )
I guess only forums with high traffic need it (there will be the difference). If you don't have redis enabled, probably you don't need it.
Otherwise you already would contact support regarding the slow forum, they would take a look and gave you a link to the tutorial "how to enable cache". )
 
Top