35 \
Magento\Framework\AuthorizationInterface $authorization,
36 \
Magento\Framework\UrlInterface $urlBuilder,
39 $this->_authorization = $authorization;
40 $this->_urlBuilder = $urlBuilder;
52 foreach ($this->_cacheTypeList->getInvalidated() as
$type) {
75 return $this->_authorization->isAllowed(
76 'Magento_Backend::cache' 90 $message =
__(
'One or more of the Cache Types are invalidated: %1. ', $cacheTypes) .
' ';
91 $url = $this->_urlBuilder->getUrl(
'adminhtml/cache');
92 $message .=
__(
'Please go to <a href="%1">Cache Management</a> and refresh cache types.',
$url);
103 return $this->_urlBuilder->getUrl(
'adminhtml/cache');
113 return \Magento\Framework\Notification\MessageInterface::SEVERITY_CRITICAL;
_getCacheTypesForRefresh()
__construct(\Magento\Framework\AuthorizationInterface $authorization, \Magento\Framework\UrlInterface $urlBuilder, \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList)