You are here

public function SiteAlertBlock::getCacheMaxAge in Site Alert 8

The maximum age for which this object may be cached.

Return value

int The maximum time in seconds that this object may be cached.

Overrides ContextAwarePluginBase::getCacheMaxAge

File

src/Plugin/Block/SiteAlertBlock.php, line 221

Class

SiteAlertBlock
Implements SiteAlertBlock class.

Namespace

Drupal\site_alert\Plugin\Block

Code

public function getCacheMaxAge() {

  /** @var \Drupal\site_alert\SiteAlertStorageInterface $storage */
  $storage = $this->entityTypeManager
    ->getStorage('site_alert');
  return $storage
    ->getCacheMaxAge();
}