Write a better documentation and sample settings file

Created on 20 March 2011, over 13 years ago
Updated 2 April 2023, over 1 year ago

hey

these Cache APIs/backends work fully with Cache Backport:
- File Cache (D7, no patch required) - sucessor to fastpath_fscache and Cache Router
- APC - Alternative PHP Cache (D7, no patch required) - sucessor to Cache Router
- Memcache API and Integration (D7, patch required)

these Cache APIs/backends don't work yet fully with Cache Backport:
- Database / DBTNG (buggy, supplied with Cache Backport)

Configuration snippet (based on my work with Cache Router, Memcache API and AuthCache):

/**
* 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 = FALSE; // change to TRUE to enable
$module_cache_backport_default = TRUE; // change to FALSE to specify subdomain
$module_cache_backport_inc = './sites/all/modules/cache_backport/cache.inc';
if ( $module_cache_backport_enabled == TRUE ) {
 if ( file_exists($module_cache_backport_inc) ) {
  if ( $module_cache_backport_default == TRUE ) {
      $module_cache_backport_domain = 'default';
  } else {
      $module_cache_backport_domain = $_SERVER['SERVER_NAME'];
  }
  $conf['cache_inc'] = $module_cache_backport_inc;
  // DBTNG :: DrupalDatabaseCache (DON'T USE! BUGGY!)
  //$conf['cache_backends'][] = './sites/all/modules/cache_backport/database.inc';
  // File Cache :: DrupalFileCache
  $conf['cache_backends'][] = './sites/all/modules/filecache_d7/filecache.inc';
  // APC :: DrupalAPCCache
  $conf['cache_backends'][] = './sites/all/modules/apc_d7/drupal_apc_cache.inc';
  // Memcache :: MemCacheDrupal
  //$conf['cache_backends'][] = './sites/all/modules/memcache_d7/memcache.inc';
  // Cache bins:
  $conf['cache_default_class'] = 'DrupalFileCache';
  $conf['cache_class_cache'] = 'DrupalAPCCache';
  $conf['cache_class_block'] = 'DrupalFileCache';
  $conf['cache_class_bootstrap'] = 'DrupalAPCCache';
  $conf['cache_class_content'] = 'DrupalFileCache';
  $conf['cache_class_filter'] = 'DrupalAPCCache';
  $conf['cache_class_form'] = 'DrupalAPCCache';
  $conf['cache_class_menu'] = 'DrupalFileCache';
  $conf['cache_class_page'] = 'DrupalFileCache';
  //$conf['cache_class_pathdst'] = 'DrupalFileCache';
  //$conf['cache_class_pathsrc'] = 'DrupalFileCache';
  //$conf['cache_class_uc_price'] = 'DrupalFileCache';
  $conf['cache_class_update'] = 'DrupalFileCache';
  $conf['cache_class_views'] = 'DrupalFileCache';
  $conf['cache_class_views_data'] = 'DrupalAPCCache';
  //$conf['cache_session'] = 'DrupalFileCache';
  //$conf['cache_users'] = 'DrupalFileCache';
  // Extra settings:
  $conf['filecache_directory'] = './sites/' . $module_cache_backport_domain . '/files/filecache';
  //$conf['session_inc'] = './sites/all/modules/memcache_d7/memcache-session.inc';
  $conf['memcache_servers'] = array(
    '127.0.0.1:11211' => 'default',
  );
  $conf['memcache_bins'] = array(
    'cache' => 'default',
    'cache_block' => 'default',
    'cache_bootstrap' => 'default',
    'cache_content' => 'default',
    'cache_filter' => 'default',
    'cache_form' => 'default',
    'cache_menu' => 'default',
    'cache_page' => 'default',
    'cache_pathdst' => 'default',
    'cache_pathsrc' => 'default',
    'cache_uc_price' => 'default',
    'cache_update' => 'default',
    'cache_views' => 'default',
    'cache_views_data' => 'default',
    'session' => 'default',
    'users' => 'default',
  );
 }
}
  • Cache Router (cacherouter): #945650 (under review)
  • Authenticated User Page Caching (authcache): #945656 (under review)
  • Memcache API and Integration (memcache): #1098730 (under review)
  • 📌 Task
    Status

    Closed: outdated

    Component

    Documentation

    Created by

    🇵🇹Portugal lpalgarvio Lisboa

    Live updates comments and jobs are added and updated live.
    Sign in to follow issues

    Comments & Activities

    Not all content is available!

    It's likely this issue predates Contrib.social: some issue and comment data are missing.

    • 🇮🇹Italy apaderno Brescia, 🇮🇹

      I am closing this issue, since it is for a Drupal version that now is not supported.
      Please re-open it if the issue is also relevant for other project branches that require a supported Drupal version.

    Production build 0.71.5 2024