Install
Works with Drupal: 7.xUsing Composer to manage Drupal site dependencies
Downloads
Release notes
The 20/20 DrupalCon Global Release
Overview
This release contains a number of important bug fixes, and some new features.
Do not use this release if you are using a version of PHP older than PHP 7! Due to an unintended dependency on PHP 7, you must instead upgrade to 7.x-1.8 where this has been fixed.
Performance
As with all Drupal Memcache module releases, we have done extensive load testing to confirm there are no performance regressions compared to earlier releases. For this release we used Goose to consistently simulate and compare realistic high-traffic conditions in multiple configurations.
New Features
ASCII protocol authentication
(#3150893: Add Memcached ascii authentication support)
From README.txt:
#### ASCII Protocol Authentication
If you do not want to enable the binary protocol, you can instead enable token authentication with the default ASCII protocol.
ASCII protocol authentication requires Memcached version 1.5.15 or greater started with the -Y flag, and the PECL memcached client. It was originally documented in the memcached 1.5.15 release notes:
https://github.com/memcached/memcached/wiki/ReleaseNotes1515While it will work with 1.5.15 or greater, it's strongly recommended you use memcached 1.6.4 or greater due to the following bug fix:
https://github.com/memcached/memcached/wiki/ReleaseNotes164Additional detail about this feature can be found in the protocol documentation:
https://github.com/memcached/memcached/blob/master/doc/protocol.txtAll your memcached servers need to be started with the -Y option to specify a local path to an authfile which can contain up to 8 "username:pasword" pairs, any of which can be used for authentication. For example, a simple authfile may look as follows:
foo:bar
You can then configure your website to authenticate with this username and password as follows:
$conf['memcache_ascii_auth'] = 'foo bar';
Enabling ASCII protocol authentication during load testing resulted in less than 1% overhead.
Configure memcache to behave like DB cache
From README.txt:
## STRICT COMPATIBILITY WITH DB CACHE EXPIRATIONS ##
Due to the way database caching works, the native Drupal cache will return expired cache objects which were set to expire in the future even after their expiration timestamp, because it doesn't clean up cache entries until the cache bins are garbage collected (normally during a cron.php run's general cache wipe). However, memcache can expire cached items at the specific time requested. Therefore the default behavior of the memcache module does not match the Drupal API for cache_set, which states that cache items set to expire in the future are kept at least until the given timestamp, after which they behave like CACHE_TEMPORARY (removed at the next general cache wipe).
If you wish to return to the behavior described in the cache_set API, and allow expired entries to appear valid until a general cache wipe, define the following in settings.php:
$conf['memcache_expire_wait_gc'] = TRUE;
This setting works independently from stampede support, though it changes the time at which timestamp-cached items are considered expired, and therefore affects the time at which stampede behavior happens (if enabled).
Compression enabled by default with PECL-memcached
(#2996888: enable compression by default with memcached extension (D7 branch))
## Memcached PECL Extension Support
An example configuration block is below, set in settings.php:
$conf['memcache_options'] = array( Memcached::OPT_COMPRESSION => FALSE, );
+ Memcached::OPT_COMPRESSION => FALSE,
* This disables compression in the Memcached extension. This may save some CPU cost, but can result in significantly more data being transmitted and stored. See: https://www.drupal.org/project/memcache/issues/2958403
Note: compression was already enabled by default with the PECL-memcache extension.
Upgrade minimum PECL-memcache requirements for PHP 7
(#3155134: pecl memcache module with php 7 requires version 4.0.5+)
The memcache module continues to recommend the PECL memcache extension (instead of the PECL memcached extension) for increased stability. If using PHP7+, it is important to use PECL extension 4.0.5.1 or newer:
https://pecl.php.net/package/memcache
All Changes In This Release
- #1634506: Allow expired items to make use of stampede protection; ensure that memcache optionally behaves like DB cache by markpavlitski, emsearcy, DamienMcKenna, deviantintegral: Allow expired items to make use of stampede protection; ensure that memcache optionally behaves like DB cache
- #2856140: Call to undefined function dmemcache_object_cluster() by kevinn: Call to undefined function dmemcache_object_cluster()
- [##2864451] by xdevx, Jeremy: Warning: Cannot use a scalar value as an array in
- #2864659: Notice: Trying to get property of non-object in _dmemcache_get_pieces() by bkosborne, Jeremy, Fabianx: Notice: Trying to get property of non-object in _dmemcache_get_pieces()
- #2879600: Call to a member function getStats() on boolean by dodozhang21, osopolar: Call to a member function getStats() on boolean
- #2942568: Remove nonexistent Drupal.jsEnabled check by hugronaphor: Remove nonexistent Drupal.jsEnabled check
- #2981613: track_error INI directive is deprecated in PHP 7.2 by darrellulm, HitchShock, Jeremy, Rajat Charde: track_error INI directive is deprecated in PHP 7.2
- #2987879: memcache_admin should add the URL for which it reports stats by fgm, Jeremy: memcache_admin should add the URL for which it reports stats
- [#2993368[ by marco, Fabianx: Stampede protection will not load new data from cache, but instead make old invalid data valid again
- #2996888: enable compression by default with memcached extension (D7 branch) by mcdruid: enable compression by default with memcached extension (D7 branch)
- #3013021: Wrong variable used logging filename in _dmemcache_write_debug() by GoZ: Wrong variable used logging filename in _dmemcache_write_debug()
- #3037782: dmemcache_stats() notice by ShaunLaws, Jeremy: dmemcache_stats() notice
- #3044847: _dmemcache_write_debug uses undefined variable $memcache_debug_file by Jeremy, fgm, sokru: _dmemcache_write_debug uses undefined variable $memcache_debug_file
- #3044938: dmemcache_object uses undefined extension, and performs useless work using it by Jeremy, fgm, fabianx: dmemcache_object uses undefined extension, and performs useless work using it
- #3055155: MemCacheDrupal::getMultiple() issue with stampede protection by marco: MemCacheDrupal::getMultiple() issue with stampede protection
- #3144380: Resolve PHP 7.2, 7.3 & 7.4 compatibility warnings for 7.x-1.x-dev by divyesh19, vuil: Resolve PHP 7.2, 7.3 & 7.4 compatibility warnings for 7.x-1.x-dev
- #3150893: Add Memcached ascii authentication support by Jeremy, peximo, Fabianx: Add Memcached ascii authentication support
- #3155134: pecl memcache module with php 7 requires version 4.0.5+ by Jeremy, marco: pecl memcache module with php 7 requires version 4.0.5+