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

<?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',
);

$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.46 KB) | zip (9.44 KB) 2012-Nov-19 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 - 33 commits
    last: 26 weeks ago, first: 2 years ago

Issues for Cache Heuristic

To avoid duplicates, please search before submitting a new issue.
All issues
Bug reports
Statistics (2 years)
New issues
Open bugs
Participants