(note: do not apply this patch on vBulletin 3.7 as it's included already)
This patch allow you to use XCache as a datastore cache in vBulletin. This is definitely your choice if you have installed and enabled XCache on you server already.
Take care that this is a beta version and was not heavily tested. And i'm not familiar with vBulletin source code as i just started reading it today, but i don't have any difficulty reading it thanks to my years of php skill
Take aware that some vB plugin is not compatible with vB_datastore_*, not just vB_datastore_XCache. So, in case you find vB_datastore_XCache won't work, you'd better try datastore to file or memcache. If one of the others works but not vB_datastore_XCache, do report it to me so i can fix it.
// vB_Datastore_Filecache - for using a cache file
// $config['Datastore']['class'] = 'vB_Datastore_Filecache';
$config['Datastore']['class'] = 'vB_Datastore_XCache';
// vB_Datastore_Memcached - for using a Memcache server
// It is also necessary to specify the hostname or IP address and the port the server is listening on
Trouble Shooting
q. i have multiple vBulletin instance installed, the seems to mix data after install this plugin
a. this applies to apc too because, if you wanna fix it, try
open class_core.php, look for:
$this->prefix =& $this->registry->config['Datastore']['prefix'];
and modify to:
$this->prefix = $this->registry->config['Datastore']['prefix'] . $_SERVER['SERVER_NAME']; // or HTTP_HOST
q. Warning: unserialize() expects parameter 1 to be string, array given in $a.php on line $b
a. upgrade your plugin/hack that $a.php belongs to, e.g. vbjournal/vbgallery etc. OR open $a.php and locate at line $b, remove unserialize call, e.g.:
replace $var = unserialize($this->data);
with $var = $this->data;
be careful do not remove the whole line, just the unseralize( and )
i m also getting this error
Fatal error: Class vb_datastore_xcache: Cannot inherit from undefined class vb_datastore in /home/forum/public_html/includes/class_datastore_xcache.php on line 14
i checked the answer of phpxcache regarding this error but unable to do. Please guide me.
I prefer installing memcached (for datastore) then use XCache for the rest of the php files. From my tests, this combination improves the VB performance by over 250%. Expecially if you use 2 servers or more for your site.
I am running memcached here. Can I use both or they are mutual exclusive? Anyone made performance tests comparing the two?
anyone have any ideas how this would work with load balanced multi web server setup ? guess memcached would work better for load balanced servers ?
I use memcached on my setup, I have two webservers and I installed memcached on my MySQL server, so the memcached on MySQL server caches for both webservers.
you can use XCache as opcode cacher, while using xcache OR memcached as vBulletin datastore cache.
Can you explain how?, I'll installed the Xcache hack, and It will Cache the php files?, can someone explain what do you mean by "datastore"?
how can I work with memcache and Xcache to get the most out of the two of them?
memcache will cache the DB ( how exactly ? ) there is another hack?
and the Xcache will cache the php time? and the php process time will be faster?