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

full settings for cache_backport, stripped of disabled stuff:

/**
* Cache settings: Cache Backport (cache_backport)
*
* Cache API backport from Drupal 7, running on file, db, apc, xcache or memcache engines.
*/
$module_cache_backport_enabled = TRUE;  // change to TRUE to enable
$module_cache_backport_default = TRUE; // change to FALSE to detect subdomain
$module_cache_backport_inc     = './sites/all/modules/performance/cache_backport/cache.inc';
// Conditional loading
if ( $module_cache_backport_enabled == TRUE ) {
  // Set domain/subdomain
  if ( $module_cache_backport_default == TRUE ) {
      $module_cache_backport_domain = 'default';
  } else {
      $module_cache_backport_domain = $_SERVER['SERVER_NAME'];
  }
  // Define cache engines:
  $module_cache_backport_database             = TRUE;  // set TRUE to enable Database (DrupalDatabaseCache)
  $module_cache_backport_database_inc         = './sites/all/modules/performance/cache_backport/database.inc';
  $module_cache_backport_filecache            = TRUE;  // set TRUE to enable File Cache (DrupalFileCache)
  $module_cache_backport_filecache_inc        = './sites/all/modules/performance/filecache_d7/filecache.inc';
  $module_cache_backport_apc                  = TRUE;  // set TRUE to enable APC (DrupalAPCCache)
  $module_cache_backport_apc_inc              = './sites/all/modules/performance/apc_d7/drupal_apc_cache.inc';
  $module_cache_backport_memcache             = TRUE;  // set TRUE to enable Memcache (MemCacheDrupal)
  $module_cache_backport_memcache_inc         = './sites/all/modules/performance/memcache_d7/memcache.inc';
  // Load Include files
  if ( file_exists($module_cache_backport_inc) ) $conf['cache_inc'] = $module_cache_backport_inc;
  if ( $module_cache_backport_database == TRUE ) if ( file_exists($module_cache_backport_database_inc) ) $conf['cache_backends'][] = $module_cache_backport_database_inc;
  if ( $module_cache_backport_filecache == TRUE ) if ( file_exists($module_cache_backport_filecache_inc) ) $conf['cache_backends'][] = $module_cache_backport_filecache_inc;
  if ( $module_cache_backport_apc == TRUE ) if ( file_exists($module_cache_backport_apc_inc) ) $conf['cache_backends'][] = $module_cache_backport_apc_inc;
  if ( $module_cache_backport_memcache == TRUE ) if ( file_exists($module_cache_backport_memcache_inc) ) $conf['cache_backends'][] = $module_cache_backport_memcache_inc;
  // Define cache bins (optimized):
  $conf['cache_default_class']    = 'DrupalDatabaseCache'; // default, any/any/any, select memcache, apc, file or 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_uc_price']   = 'MemCacheDrupal';      // multiprice, any/often/medium, select memcache > db > file
  $conf['cache_class_update']     = 'DrupalFileCache';     // system, system/rare/large, select 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
  // Define File Cache settings
  $conf['filecache_directory'] = './sites/' . $module_cache_backport_domain . '/files/filecache';
  // Define APC settings
  $conf['memcache_servers'] = array(
    '127.0.0.1:11211' => 'default',
  );
  $conf['memcache_bins'] = array(
    'cache_block' => 'default',
    'cache_menu' => 'default',
    'cache_page' => 'default',
    'cache_uc_price' => 'default',
    'cache_views' => 'default',
  );
}

Status:Active» Postponed (maintainer needs more info)

We did talk *a lot* before about this module configuration, is this issue still up to date or can I close it?

Status:Postponed (maintainer needs more info)» Fixed

Closing it, please re-open if any problems.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Status:Closed (fixed)» Active

i 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

Status:Active» Postponed (maintainer needs more info)

Can you show your settings.php file part that configure the cache backends please?

its 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.

Status:Postponed (maintainer needs more info)» Active

Ok, 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.

Status:Active» Closed (works as designed)

I 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):

$conf['cache_inc'] = 'sites/all/modules/custom/cache_backport/cache.inc';
$conf['cache_backends'][] = 'sites/all/modules/cache_backends/apc/drupal_apc_cache.inc';
$conf['cache_backends'][] = 'sites/all/modules/cache_backends/filecache/filecache.inc';
// Define cache bins (optimized):
$conf['cache_default_class']    = 'DrupalDatabaseCache';
// $conf['cache_class_bootstrap']  = 'DrupalAPCCache';
$conf['cache_class_cache_block']      = 'MemCacheDrupal'; // Probably should be in a faster backend.
$conf['cache_class_cache_cache']      = 'DrupalAPCCache';
$conf['cache_class_cache_content']    = 'DrupalFileCache'; // This is a bad idea.
$conf['cache_class_cache_filter']     = 'DrupalFileCache'; // This is a bad idea.
$conf['cache_class_cache_form']       = 'DrupalFileCache'; // This is a bad idea.
$conf['cache_class_cache_menu']       = 'MemCacheDrupal';  // Probably should be APC if possible.
$conf['cache_class_cache_page']       = 'MemCacheDrupal';
// $conf['cache_class_cache_pathdst']    = 'MemCacheDrupal';
// $conf['cache_class_cache_pathsrc']    = 'MemCacheDrupal';
// $conf['cache_class_cache_uc_price']   = 'MemCacheDrupal';
// $conf['cache_class_cache_session']    = 'MemCacheDrupal';
$conf['cache_class_cache_update']     = 'DrupalFileCache';
//$conf['cache_class_users']      = 'MemCacheDrupal';
$conf['cache_class_cache_views']      = 'MemCacheDrupal'; // Probably should be in a faster backend.
$conf['cache_class_cache_views_data'] = 'DrupalAPCCache';

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.

interesting. will give another try soon.
thank you :)