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\BlockCode
public function getCacheMaxAge() {
/** @var \Drupal\site_alert\SiteAlertStorageInterface $storage */
$storage = $this->entityTypeManager
->getStorage('site_alert');
return $storage
->getCacheMaxAge();
}