Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
hey
having some trouble with multiple concurrent backends.
enabled DB, File Cache, APC and Memcache and used this configuration:
// Define cache bins (optimized):
$conf['cache_default_class'] = 'DrupalDatabaseCache'; // default, any/any/any, select memcache, apc, file or db
//$conf['cache_class_bootstrap'] = 'DrupalAPCCache'; // bootstrap, all/every/medium, select apc > db
$conf['cache_class_block'] = 'MemCacheDrupal'; // block, any/often/small, select memcache > db > file
$conf['cache_class_cache'] = 'DrupalAPCCache'; // general, all/every/medium, select apc > db
$conf['cache_class_content'] = 'DrupalFileCache'; // field, page/some/large, select file > memcache > db
$conf['cache_class_filter'] = 'DrupalFileCache'; // filtered, page/some/large, select file > memcache > db
$conf['cache_class_form'] = 'DrupalFileCache'; // block, edit/rare/medium, select file > memcache > db
$conf['cache_class_menu'] = 'MemCacheDrupal'; // menu, any/often/large, select memcache > db > file
$conf['cache_class_page'] = 'MemCacheDrupal'; // node, page/often/large, select memcache > file > db
//$conf['cache_class_pathdst'] = 'MemCacheDrupal'; // path, any/some/medium, select memcache > db > file
//$conf['cache_class_pathsrc'] = 'MemCacheDrupal'; // path, any/some/medium, select memcache > db > file
//$conf['cache_class_uc_price'] = 'MemCacheDrupal'; // multiprice, any/often/medium, select memcache > db > file
//$conf['cache_class_session'] = 'MemCacheDrupal'; // session, any/any/small, select memcache > db
$conf['cache_class_update'] = 'DrupalFileCache'; // system, system/rare/large, select file > db
//$conf['cache_class_users'] = 'MemCacheDrupal'; // users, any/some/large, select memcache > file > db
$conf['cache_class_views'] = 'MemCacheDrupal'; // views, any/some/large, select memcache > file > db
$conf['cache_class_views_data'] = 'DrupalAPCCache'; // views data, any/often/small, select apc > db
but everything ends in DB because of $conf['cache_default_class'] = 'DrupalDatabaseCache';
if i remove that, it still does not respect the bins and everything goes in the DB.
if i disable DB, same happens
if i set APC, Memcache or File as default, it all goes in the corresponding bin.
it seems nothing is getting distributed in the engines.
what i'm i doing wrong?
Comments
Comment #1
lpalgarvio CreditAttribution: lpalgarvio commentedfull settings for cache_backport, stripped of disabled stuff:
Comment #2
pounardWe did talk *a lot* before about this module configuration, is this issue still up to date or can I close it?
Comment #3
pounardClosing it, please re-open if any problems.
Comment #5
lpalgarvio CreditAttribution: lpalgarvio commentedi haven't experimented again, but my tests during mid march indicated that it was impossible to active more than 1 backend at same time.
the system would use the first backend specified for everything, or use it for the tables we tell it to, then relay the remaining tables to DB.
so i couldn't use concurrently APC and Memcache or FileCache for example.
that's the issue... a bug... or maybe my configuration.
please review and point out whats wrong or test it yourself when you have time.
thanks
Comment #6
pounardCan you show your settings.php file part that configure the cache backends please?
Comment #7
lpalgarvio CreditAttribution: lpalgarvio commentedits the configuration shown above.
the first post shows only the cache bins
the second posts shows everything
if i enable just one engine, it works fine, no matter which engine i enable (DB, APC, Memcache, FileCache)
if i enable more than one engine, only one engine functions.
Comment #8
pounardOk, let me some time I'll test the settings file you gave me and debug it.
Can't promise you I'll have the time in the weekend though, but I'll try.
Comment #9
pounardI found why your configuration file doesn't work.
First of all, bins are being named:
cache_BIN
So when I write that variables must be named:
cache_class_BIN
Then what it really means is:
cache_class_cache_BIN
For example, the bin that stores pages is named:
cache_page
And not:
page
So in the configuration I would write:
$conf['cache_class_cache_page'] = 'SomeClassHere';
AND NOT:
$conf['cache_class_page'] = 'SomeClassHere';
Here it is! Fixed! Let me show you the configuration I used myself (which works):
By the way, investigating your bug made me discover some others. DrupalFileCache won't work without the DRUPAL_ROOT constant, which I'm actually fixing in the module code. Will do a release in the weekend with maybe some administration screens.
Comment #10
lpalgarvio CreditAttribution: lpalgarvio commentedinteresting. will give another try soon.
thank you :)