• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Speed up your Board /caching

  • Thread starter Thread starter ragtek
  • Start date Start date
XenFans for example in MY opinion doesn't benefit from 1800 seconds of fresh cache ..
It caches a lot, and doesn't get read a lot because of low traffic, and results in expiring before it's really used ..

XenFans during peak hours for example in MY opinion doesn't benefit from say half a day of fresh cache ..
It caches a lot, and keeps it, so it can be re-used, handy for low traffic. But, despite peak hour and hanging on to things so it benefits in the long(er) run. It will have more stale files which you desire to expire since they're hardly hit.
One of the things to remember is that XenForo (currently) doesn't cache a lot of data into Memcached. After adding a quick piece of debug to the cache code, it only looks like it caches the following keys.
Get: xf_data_options
Get: xf_data_languages
Get: xf_data_contentTypes
Get: xf_data_codeEventListeners
Get: xf_data_cron
Get: xf_data_simpleCache
Get: xf_data_routesPublic
Get: xf_data_nodeTypes
Get: xf_data_bannedIps
Get: xf_data_discouragedIps
Get: xf_data_styles
Get: xf_data_displayStyles
Get: xf_data_smilies
Get: xf_data_bbCode
Get: xf_data_trophyUserTitles
Get: xf_data_reportCounts
Get: xf_data_moderationCounts
Unless you are making a lot of changes, you could probably* boost the cache time quite a bit and be safe. You would need to add a codeListener though to clear the cache for the moderation & report information.
*Buyer beware... there is unimplemented methods & notes in the code about cache additional data in the future.

APC or memcached, etc. .... that's different than opcode caching by xenforo, which is what these lifetime settings are for if I understand it correctly. http://xenforo.com/community/threads/tip-use-apc.6456/page-4#post-237629
APC is used for PHP opcode caching when it is installed and enabled (on by default with modern PHP builds). You don't need to change any XenForo configs to take advantage of the opcode caching. While APC "could" be used for data caching, 99.9% of the time I'd recommend against it. Memcached is a much better solution that is built specifically for shared data caching.
 
One of the things to remember is that XenForo (currently) doesn't cache a lot of data into Memcached. After adding a quick piece of debug to the cache code, it only looks like it caches the following keys.
Get: xf_data_options
Get: xf_data_languages
Get: xf_data_contentTypes
Get: xf_data_codeEventListeners
Get: xf_data_cron
Get: xf_data_simpleCache
Get: xf_data_routesPublic
Get: xf_data_nodeTypes
Get: xf_data_bannedIps
Get: xf_data_discouragedIps
Get: xf_data_styles
Get: xf_data_displayStyles
Get: xf_data_smilies
Get: xf_data_bbCode
Get: xf_data_trophyUserTitles
Get: xf_data_reportCounts
Get: xf_data_moderationCounts
Unless you are making a lot of changes, you could probably* boost the cache time quite a bit and be safe. You would need to add a codeListener though to clear the cache for the moderation & report information.
*Buyer beware... there is unimplemented methods & notes in the code about cache additional data in the future.

APC is used for PHP opcode caching when it is installed and enabled (on by default with modern PHP builds). You don't need to change any XenForo configs to take advantage of the opcode caching. While APC "could" be used for data caching, 99.9% of the time I'd recommend against it. Memcached is a much better solution that is built specifically for shared data caching.

Memcached is only really suitable for distributed caching which was what is solely designed for. If you run a single webserver and want data caching I still prefer APC.
 
Can someone post the exact code they used to get xCache up and running?
I found this elsewhere on the forum.

PHP:
$config['cache']['enabled'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions'] = array(
'caching' => true,
'automatic_serialization' => true,
'lifetime' => 3600,
'cache_id_prefix' => 'xfxcache_'
);

$config['cache']['backend'] = 'xcache';
 
Top Bottom