Download & Extend

Cache Heuristic

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

$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

$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

$conf['cache_backends'] = array(
  'sites/all/modules/cache_graceful/cache_graceful.inc',
  'sites/all/modules/cache_heuristic/cache_heuristic.inc',
);

$conf['cache_default_class'] = 'GracefulCache';
$conf['graceful_cache_default_class'] = 'HeuristicCache';
$conf['heuristic_cache_default_class'] = 'DrupalDatabaseCache';

// Example: Use memcach for the menu cache
$conf['heuristic_cache_class_cache_menu'] = 'MemCacheDrupal';

Downloads

Recommended releases

Version Downloads Date Links
7.x-1.0 tar.gz (8.41 KB) | zip (9.41 KB) 2012-Jan-07 Notes
6.x-1.0 tar.gz (8.46 KB) | zip (9.47 KB) 2012-Jan-07 Notes

Development releases

Version Downloads Date Links
7.x-1.x-dev tar.gz (8.44 KB) | zip (9.42 KB) 2012-Mar-26 Notes
6.x-1.x-dev tar.gz (8.49 KB) | zip (9.5 KB) 2012-Mar-24 Notes

Project Information


Maintainers for Cache Heuristic

  • gielfeldt - 32 commits
    last: 9 weeks ago, first: 1 year ago

Issues for Cache Heuristic

To avoid duplicates, please search before submitting a new issue.
All issues
Bug reports