This page contains configurations which are specific to PECL Memcache extension.

Compression mode

You may enabled or disable compression mode for cache stored in memcached servers.

Drupal 7:

$conf['memcache_storage_compress_data'] = TRUE;

Drupal 8:

$settings['memcache_storage']['compression_enabled'] = TRUE;

Default value: FALSE

Enabling or disabling the compression mode mightlead to the minor performance changes. It depends on your network infrastructure.

Automatic compression for big values

Compress threshold enables automatic compression of large values.

Drupal 7:

$conf['memcache_storage_compress_threshold'] = array(
  'threshold' => 20000,
  'min_savings' => 0.2,
);

Drupal 8:

$settings['memcache_storage']['compress_threshold'] = [
  'threshold' => 20000, 
  'min_savings' => 0.2
];

Default value: array('threshold' => 20000, 'min_savings' => 0.2)

Persistent connection

PECL memcached has an ability to open a persistent connection to memcached server(s). You have to enabled the following settings to turn this feature on:

Drupal 7:

$conf['memcache_storage_persistent_connection'] = TRUE;

Drupal 8:

$settings['memcache_storage']['persistent_connection'] = FALSE;

Default value: FALSE