suggestions for settings.php

Created on 19 October 2010, over 13 years ago
Updated 2 April 2023, about 1 year ago

hello

i've made some changes and though it would be nice to share ;)
the changes include:
- variable to turn on caching (false, no cache from cacherouter)
- detection of the module inc file (false, no crash)
- automatic path for domain (so the code will less likely need changes when adding to a new site. also good for multi-site environments built with symlinks)

/** 
 * Cache Router
 *
 * Cache API for Anonymous users, running on file, db, apc, xcache or memcache engines.
 */
$module_cacherouter_enabled = FALSE;
$module_cacherouter_inc = './sites/all/modules/performance/cacherouter/cacherouter.inc';
if ( file_exists($module_cacherouter_inc) && $module_cacherouter_enabled == TRUE ) {
  $conf['cache_inc'] = $module_cacherouter_inc;
  $conf['cacherouter'] = array(
    'default' => array(
      'engine' => 'file',
      'servers' => array(),
      'shared' => TRUE,
      'prefix' => '',
      'path' => 'sites/' . $_SERVER['SERVER_NAME'] . '/files/filecache',
      'static' => FALSE,
      'fast_cache' => FALSE,
    ),
  );
}

posting a similar version for authcache module

✨ Feature request
Status

Closed: outdated

Version

1.0

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.69.0 2024