You are here

public function PrivateMessageNotificationBlock::getCacheTags in Private Message 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Block/PrivateMessageNotificationBlock.php \Drupal\private_message\Plugin\Block\PrivateMessageNotificationBlock::getCacheTags()

The cache tags associated with this object.

When this object is modified, these cache tags will be invalidated.

Return value

string[] A set of cache tags.

Overrides ContextAwarePluginBase::getCacheTags

File

src/Plugin/Block/PrivateMessageNotificationBlock.php, line 119

Class

PrivateMessageNotificationBlock
Provides the private message notification block.

Namespace

Drupal\private_message\Plugin\Block

Code

public function getCacheTags() {
  return Cache::mergeTags(parent::getCacheTags(), [
    'private_message_notification_block:uid:' . $this->currentUser
      ->id(),
  ]);
}