function og_subgroups_clear_caches_for_group in Subgroups for Organic groups 7.2
Clears out the caches for a given group.
2 calls to og_subgroups_clear_caches_for_group()
- og_subgroups_node_access_records_alter in ./
og_subgroups.module - Implements hook_node_access_records_alter().
- og_subgroups_og_membership_insert in ./
og_subgroups.module - Implements hook_og_membership_insert().
File
- ./
og_subgroups.module, line 370 - Provides users the ability to inherit permissions on subgroups.
Code
function og_subgroups_clear_caches_for_group($group_type, $group_id) {
_og_subgroups_clear_caches_for_group($group_type, $group_id);
// Get only the immediate parents, who's child caches will contain this node.
foreach (og_subgroups_parents_load($group_type, $group_id, FALSE, TRUE) as $group_type => $group_ids) {
foreach ($group_ids as $group_id) {
_og_subgroups_clear_caches_for_group($group_type, $group_id);
}
}
}