Problem/Motivation

Large sites with a lot of content/languages should use Memcache selectively.

Proposed resolution

Document alternative options of using Memcache in general.settings.php (By default it should be commented)

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

sdstyles created an issue. See original summary.

sdstyles’s picture

Status: Active » Needs review
mallezie’s picture

Status: Needs review » Needs work

IMO our documentation should be a bit more vague, since this highly depends on the website (traffic and used modules) and on the uses memcache settings (memory).

What about just putting some cache bins in memcache by default and allowing to add more. Currently we exclude form cache (good) but in some cases container / config / bootstrap could also be problematic.

Something like this might be better?

  // Define which cache bins should be stored in memcache. 
  // Some (highly volatile) bins could cause problems when stored in memcache, so by default we only add the largest ones in memcache. 
  // For example form cache should not be stored in memcache. 
  // Also bins like config / container / discovery could cause problems depending on your website / hosting. 
  $settings['cache']['bins']['page'] = 'cache.backend.memcache';
  $settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.memcache';
  $settings['cache']['bins']['render'] = 'cache.backend.memcache';
  $settings['cache']['bins']['menu'] = 'cache.backend.memcache';
  // You can manually add more cache bins here to memcache. 
  // This should be decided on a per site basis, and is also dependant on your memcache setup (amount of memory for ex.)
  # $settings['cache']['bins']['migrate'] = 'cache.backend.memcache';
  # $settings['cache']['bins']['geocoder'] = 'cache.backend.memcache';
  # $settings['cache']['bins']['file_mdm'] = 'cache.backend.memcache';
  # $settings['cache']['bins']['discovery_migration'] = 'cache.backend.memcache';
  # $settings['cache']['bins']['advagg'] = 'cache.backend.memcache';

  // Form cache should never be stored in memcache.
  $settings['cache']['bins']['form'] = 'cache.backend.database';
mallezie’s picture

Changing default memcache setup will be discussed in #3334099: Improve memcache defaults and is out of scope here. I've added some remarks for the proposed comments in the MR.

sdstyles’s picture

Status: Needs work » Needs review

Updated memcache documentation based on proposed recommendations.

mallezie’s picture

Status: Needs review » Reviewed & tested by the community

Thanks sdstyles. This looks much better to me.

nginex made their first commit to this issue’s fork.

  • nginex committed b337e227 on 10.0.x authored by sdstyles
    Issue #3333828: Document Memcache usage and configuration in settings...
nginex’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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