Cache Heuristic keeps track of which cache-entries are loaded a page, and bundles the cache loads by taking advantage of Cache->getMultiple(). Resulting in a reduced number of queries to the caching backend.
To enable, add to settings.php:
Drupal 6
NOTE: Requires Cache Backport
<?php
$conf['cache_backends'] = array(
'sites/all/modules/cache_heuristic/cache_heuristic.inc'
);
$conf['cache_inc'] = 'sites/all/modules/cache_backport/cache.inc';
$conf['cache_default_class'] = 'HeuristicCache';
$conf['heuristic_cache_default_class'] = 'DrupalDatabaseCache';
?>
Drupal 7
<?php
$conf['cache_backends'] = array(
'sites/all/modules/cache_heuristic/cache_heuristic.inc'
);
$conf['cache_default_class'] = 'HeuristicCache';
$conf['heuristic_cache_default_class'] = 'DrupalDatabaseCache';
// Example: Use memcach for the menu cache
$conf['heuristic_cache_class_cache_menu'] = 'MemCacheDrupal';
?>
Graceful caching
You can mix and match caching backends, e.g. adding graceful caching to the Drupal 7 example above using Cache Graceful
<?php
$conf['cache_backends'] = array(
'sites/all/modules/cache_graceful/cache_graceful.inc',
'sites/all/modules/cache_heuristic/cache_heuristic.inc',
);