Install
Works with Drupal: 7.xUsing Composer to manage Drupal site dependencies
Downloads
Release notes
The Oversized Holiday Release (BETA)
By default, the memcached daemon only stores objects up to 1 MiB in size and attempts to store larger objects would fail silently. With this release, the Drupal memcache module now automatically splits over-sized objects into smaller pieces that can be stored (and automatically puts them back together when they are retrieved from the cache). A message will be written to the watchdog log whenever an over-sized object is split into pieces, logging how long the process took and how many pieces the data was split into. Two related configurables are documented in README.txt for advanced users (memcache_data_max_length and memcache_log_data_pieces).
Stampede protection has been enhanced to support fine-grained control of which locks are affected. This is important, as it is primarily designed to benefit the following caching pattern: a miss on a cache_get() for a specific cid is immediately followed by a cache_set() for that cid. Of course, this is not the only caching pattern used in Drupal, so stampede protection can be selectively disabled for optimal performance. For example, a cache miss in Drupal core's module_implements() won't execute a cache_set until drupal_page_footer() calls module_implements_write_cache() which can occur much later in page generation. To avoid long hanging locks, stampede protection should be disabled for these delayed caching patterns. Memcache stampede protection can now be disabled for entire bins, specific cid's in specific bins, or cid's starting with a specific prefix in specific bins.
These are not the only bug fixes and improvements in this release, see below for the complete list. This is an important update to the Drupal memcache module. It is recommended that you start testing now.
What’s changed since 7.x-1.3
Overview
The biggest new feature in this release is support for caching objects >1 MiB in size. However, there are many other important fixes and improvements listed below.
Details
- #435694: >1M data writes incompatible with memcached (memcached -I 32M -m32)
Allow caching of data larger than 1MiB by splitting large items into pieces. - #1613622: Memcache not using urlencode on $prefix or $bin in dmemcache_key() when strlen($full_key) > 250
Preserve as much of long key names as possible to aid in debugging. - #2335727: Setting $cache->created with msec precision borks page caching.
Move microtime timestamp into $cache->create_microtime. - #2361001: Page cache never expires if authcache_builtin_cache_without_database is enabled
Make authcache-compatible check for bootstrap level when testing of variables are loaded. - #2367609: Locking framework fails silently for locks with names longer than 250 characters
Warn if stampede protection is enabled with core database locking. - #2376391: Call to undefined function lock_acquire()
Be sure lock_acquire() is available after attempted bootstrap. - #2377587: Allow to disable memcache stampede protection for specific cache bins and CIDs
Stampede protection can be disabled on a per-bin basis. Disable some by default. - #2381829: Ignore stampede protection ignoring for the theme registry and schema as well as rules.
Disable stampede protection for other incompatible tables/cids. - #2387793: Notice in install profile
Fix a notice triggered when installing memcache from an install profile.
Testing
As always, we have done comprehensive load testing to ensure that there have been no performance regressions introduced in this release. The loadtests we used are freely available at https://github.com/tag1consulting/drupal-loadtest. They assist in pre-populating a site with data and running a jMeter loadtest suite against the test website. While the tests aren’t comprehensive and only focus on common core functionality, they provide fantastic insight and detail into the performance differences between releases. (For example, the load tests caught a number of issues and greatly improved the final patch committed for #435694: >1M data writes incompatible with memcached (memcached -I 32M -m32), ensuring that this new functionality doesn't cause a performance penalty for websites that don't have over-sized cache items.)