jbonlinemedia
Customer
Hello,
I am writing a data cache extension to vBoptimise to use redis as a data store rather than memcache. Long story short, the memcache store is having issues with our site because the forumcache object is so large; and I have rewritten the core vbulletin data store to use redis master/slave caching.
Anyway, I seem to be running into a few issues. I'm not sure where to register the new model. I used this code to register it in init_startup.php hook:
vb_optimise::$prefix = $vbulletin->options['vbo_prefix'];
/* XDA Modification */
vb_optimise::register('models', 'redis');
vb_optimise::assign('redis');
//vb_optimise::assign($vbulletin->options['vbo_operator']);
/* End of XDA Modification */
vb_optimise::cache('datastore', $datastore_fetch);
I initially added in as a plugin to vBulletin, perhaps due to execution order it was not actually being used. I added it to the init_startup.php hook location and it does seem to be loading it, but vBoptimise isn't using it as a store. Also, in the admin interface I see that Redis is not added as an option, the options are hard coded into the installation .xml file.
How should I properly add this as an extension for data store?
Thank you.
I am writing a data cache extension to vBoptimise to use redis as a data store rather than memcache. Long story short, the memcache store is having issues with our site because the forumcache object is so large; and I have rewritten the core vbulletin data store to use redis master/slave caching.
Anyway, I seem to be running into a few issues. I'm not sure where to register the new model. I used this code to register it in init_startup.php hook:
vb_optimise::$prefix = $vbulletin->options['vbo_prefix'];
/* XDA Modification */
vb_optimise::register('models', 'redis');
vb_optimise::assign('redis');
//vb_optimise::assign($vbulletin->options['vbo_operator']);
/* End of XDA Modification */
vb_optimise::cache('datastore', $datastore_fetch);
I initially added in as a plugin to vBulletin, perhaps due to execution order it was not actually being used. I added it to the init_startup.php hook location and it does seem to be loading it, but vBoptimise isn't using it as a store. Also, in the admin interface I see that Redis is not added as an option, the options are hard coded into the installation .xml file.
How should I properly add this as an extension for data store?
Thank you.
Last edited: