Improve memcache defaults

Created on 17 January 2023, about 2 years ago

Problem/Motivation

Currently below is our default memcache configuration.

// Set backends to use memcache.
  $settings['cache']['default'] = 'cache.backend.memcache';
  $settings['cache']['bins']['form'] = 'cache.backend.database';

So we put everything, except form in memcache. IMO this is a bit dangerous default. Some cache bins are better not in memcache, and this default everythings.

Proposed resolution

By default do not put everything in memcache, just the more safe / larger bins, which have the most effect to be in memcache.

  // 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 dependant on your memcache setup and in place contrib cache bins.

Remaining tasks

Discuss it.

📌 Task
Status

Active

Version

10.0

Component

Code

Created by

🇧🇪Belgium mallezie Loenhout

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.

No activities found.

Production build 0.71.5 2024