You are here

function _relation_add_field_cache_clear in Relation add 7

Clear the field cache for relation endpoints.

Parameters

object $relation: The relation to clear endpoints for.

2 calls to _relation_add_field_cache_clear()
relation_add_entity_delete in ./relation_add.module
Implements hook_entity_delete().
relation_add_entity_presave in ./relation_add.module
Implements hook_entity_presave().

File

./relation_add.module, line 1309
Relation Add module file.

Code

function _relation_add_field_cache_clear($relation) {
  foreach ($relation->endpoints[LANGUAGE_NONE] as $endpoint) {
    $cid = "field:{$endpoint['entity_type']}:{$endpoint['entity_id']}";
    cache_clear_all($cid, 'cache_field');
  }
}