- Oct 16, 2019
- 373
- 189
- 43
A friend of mine is working on a XenForo 2.1 forum and has run into a slight issue. Basically, what he wants is for Memcached to cache the entire site for guests and logged in users. He doesn't want separate caches for guests and logged in users. He figured that if he caches everything, the site will be fast for guests browsing the forum and for the registered users.
From the below sets of codes, what should be added or changed to achieve the goal of caching the entire site for everyone?
CODE 1:
CODE 2:
From the below sets of codes, what should be added or changed to achieve the goal of caching the entire site for everyone?
CODE 1:
PHP:
$config['cache']['enabled'] = true;
$config['cache']['provider'] = 'Memcached';
$config['cache']['config'] = [
'server' => '127.0.0.1'
];
$config['cache']['context']['CONTEXT_NAME']['provider'] = 'Memcached';
$config['cache']['context']['CONTEXT_NAME']['config'] = [];
$config['cache']['enabled'] = true;
$config['pageCache']['enabled'] = true;
$config['cache']['context']['page']['provider'] = 'Memcached';
$config['cache']['context']['page']['config'] = [];
CODE 2:
PHP:
$config['cache']['enabled'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions'] = array(
'caching' => true,
'automatic_serialization' => true,
'lifetime' => 1800,
'cache_id_prefix' => 'xxx_xf'
);
#backend
#Memcached
$config['cache']['backend']='Memcached';
$config['cache']['backendOptions']=array(
'compression'=>false,
'servers' => array(
array(
'host'=>'127.0.0.1',
'port'=>11211,
)
)
);
$config['cache']['cacheSessions'] = true;