You are here

function relation_clear_related_entities_cache in Relation 7

Same name and namespace in other branches
  1. 8.2 relation.module \relation_clear_related_entities_cache()
  2. 8 relation.module \relation_clear_related_entities_cache()

Clear the cache for a set of endpoints.

Parameters

$endpoints: An array of endpoints, with entity_type and entity_id as keys.

2 calls to relation_clear_related_entities_cache()
relation_delete_multiple in ./relation.module
Deletes a relation.
relation_save in ./relation.module
Saves a relation.

File

./relation.module, line 687
Describes relations between entities.

Code

function relation_clear_related_entities_cache($endpoints) {
  drupal_static_reset('relation_get_related_entity');
  foreach ($endpoints as $endpoint) {
    cache_clear_all('relation:' . $endpoint['entity_type'] . ':' . $endpoint['entity_id'], 'cache', TRUE);
  }
}