Manage cookies that are used for advertising, such as ad personalization, remarketing, and ad effectiveness analysis.
2.14.5.6. Configure Memcache in Drupal
For more details, see Memcache(d).
- Open the page Drupal | Memcache API and Integration and at the bottom, copy the link to the archive with the latest version of the Memcache module.
- Open the admin panel of the site.
- Go to the "Extend" section.
- Click "Install new module".
- Paste the copied link into the "Install from a URL" field.
- Click "Install".
- Wait for the installation to complete.
- In the "Extend" section, select "Memcache" from the list of extensions and click "Install" at the bottom of the page.
- At the end of the file
sites/default/settings.php, add the following code:$conf['cache_backends'][] = 'sites/all/modules/memcache/memcache.inc'; $conf['lock_inc'] = 'sites/all/modules/memcache/memcache-lock.inc'; $conf['memcache_stampede_protection'] = TRUE; $conf['cache_default_class'] = 'MemCacheDrupal'; // The 'cache_form' bin must be assigned to non-volatile storage. $conf['cache_class_cache_form'] = 'DrupalDatabaseCache'; // Don't bootstrap the database when serving pages from the cache. $conf['page_cache_without_database'] = TRUE; $conf['page_cache_invoke_hooks'] = FALSE; $conf['memcache_servers'] = array('unix:///home/example/.system/memcache/socket' => 'default');In the line with the parameter
memcache_servers, instead ofexample, specify the name of the hosting account where the site is hosted.//Memcache configuration $settings['memcache']['servers'] = ['unix:///home/example/.system/memcache/socket' => 'default']; $settings['memcache']['bins'] = ['default' => 'default']; $settings['memcache']['key_prefix'] = ''; $settings['cache']['default'] = 'cache.backend.memcache';In the line with the
serversparameter, instead ofexample, specify the name of the hosting account where the site is hosted. - Check the site operation.