public function PrivateMessageThread::clearCacheTags in Private Message 8.2
Same name and namespace in other branches
- 8 src/Entity/PrivateMessageThread.php \Drupal\private_message\Entity\PrivateMessageThread::clearCacheTags()
Clear cache tags related to private message thread entities.
Overrides PrivateMessageThreadInterface::clearCacheTags
2 calls to PrivateMessageThread::clearCacheTags()
- PrivateMessageThread::delete in src/
Entity/ PrivateMessageThread.php - Deletes an entity permanently.
- PrivateMessageThread::save in src/
Entity/ PrivateMessageThread.php - Saves an entity permanently.
File
- src/
Entity/ PrivateMessageThread.php, line 270
Class
- PrivateMessageThread
- Defines the Private Message Thread entity.
Namespace
Drupal\private_message\EntityCode
public function clearCacheTags() {
$tags = [];
foreach ($this
->getMembers() as $member) {
$tags[] = 'private_message_inbox_block:uid:' . $member
->id();
$tags[] = 'private_message_notification_block:uid:' . $member
->id();
}
Cache::invalidateTags($tags);
}