You are here

bean_entitycache.module in Bean (for Drupal 7) 7

The Bean Entity cache module.

File

bean_entitycache/bean_entitycache.module
View source
<?php

/**
 * @file
 *   The Bean Entity cache module.
 */

/**
 * Implements hook_entity_info_alter().
 */
function bean_entitycache_entity_info_alter(&$entity_info) {

  // Enable Entity Cache support for beans.
  $entity_info['bean']['entity cache'] = TRUE;

  // Which means that we don't need to cache the fields.
  $entity_info['bean']['field cache'] = FALSE;

  // Provide bean entitycache controller so other modules using entitycache can
  // work with beans.
  $entity_info['bean']['controller class'] = 'BeanEntityCacheAPIController';
}

/**
 * Implements hook_flush_caches().
 */
function bean_entitycache_flush_caches() {
  return array(
    'cache_entity_bean',
  );
}