![]() |
Custom Datastore Class It would be really nice if there was an option to include a custom datastore class PHP file so we could do just that (create custom datastores). Something like this in the config.php file: PHP Code: $config['Datastore']['custom_file'] = 'class_datastore_custom.php'; And then in init.php* change this: PHP Code: if ($datastore_class != 'vB_Datastore') { require_once(DIR . '/includes/class_datastore.php'); } to this: PHP Code: if ($datastore_class != 'vB_Datastore') { if ($config['Datastore']['custom_file']) { require_once(DIR . '/includes/' . $config['Datastore']['custom_file']); } else { require_once(DIR . '/includes/class_datastore.php'); } } That would give us infinite flexibility on datastore stuff... for example using the pooling/failover mechanism in memcached without bugging you guys to add it. But there are other scenarios where I could think of why someone would want a totally custom datastore... Maybe you want to do datastore writes to more than 1 memcached server* then handle memcached reads through a hardware load balancer. Or maybe you want to use something like APC* but the storing of keys happening on multiple web servers. It just seems like a *very* easy addition to vBulletin that would allow bigger forums to develop their own custom datastores without the need to hack on PHP files. |
الساعة الآن 11:12 AM |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.5.2 TranZ By
Almuhajir