/
githubmirror
/
magento2
Обзор
Документация
Войти
/
githubmirror
/
magento2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.4-develop
lib/internal/Magento/Framework/App/Cache/RuntimeStaleCacheStateModifier.php
41 строка
999 B
Alexandra Zota
ACP2E-4019: CE copyright updates for 2.4.9-beta1
22 окт 2025, 17:47
22 окт 2025, 17:47
1b769b7
Код
Авторство
О чём код?
<?php /** * Copyright 2019 Adobe * All Rights Reserved. */ namespace Magento\Framework\App\Cache; use Magento\Framework\Cache\StaleCacheNotifierInterface; /** * Modifier of runtime cache state based on stale data notification from cache loader */ class RuntimeStaleCacheStateModifier implements StaleCacheNotifierInterface { /** @var StateInterface */ private $cacheState; /** @var string[] */ private $cacheTypes; /** * @param StateInterface $cacheState * @param string[] $cacheTypes */ public function __construct(StateInterface $cacheState, array $cacheTypes = []) { $this->cacheState = $cacheState; $this->cacheTypes = $cacheTypes; } /** * Disabled configures cache types when stale cache was detected in the current request */ public function cacheLoaderIsUsingStaleCache() { foreach ($this->cacheTypes as $type) { $this->cacheState->setEnabled($type, false); } } }