You are here

public static function EntityCacheControllerHelper::entityCacheSet in Entity cache 7

1 call to EntityCacheControllerHelper::entityCacheSet()
EntityCacheControllerHelper::entityCacheLoad in includes/entitycache.entitycachecontrollerhelper.inc
Loads entities by IDs/conditions, which are potentially cached.

File

includes/entitycache.entitycachecontrollerhelper.inc, line 248
EntityCacheControllerHelper cache helper.

Class

EntityCacheControllerHelper
Entity cache helper.

Code

public static function entityCacheSet($controller, $entities) {
  drupal_alter('entitycache_pre_cache_set', $entities, $controller->entityType);
  foreach ($entities as $id => $item) {
    cache_set($id, $item, 'cache_entity_' . $controller->entityType);
  }
  drupal_alter('entitycache_post_cache_set', $entities, $controller->entityType);
}