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'] = 'DrupalDatabaseCacheDeferred';

// Example: Use memcach for the menu cache (not implemented yet)
$conf['heuristic_cache_class_cache_menu'] = 'MemCacheDrupalDeferred';
?>

Project Information

Downloads