24 private $cacheTypeList;
50 Type\FrontendPool $pool
53 $this->cacheState = $cacheState;
66 $changedStatusTypes = [];
68 foreach ($types as
$type) {
69 if ($this->cacheState->isEnabled(
$type) === $isEnabled) {
72 $this->cacheState->setEnabled(
$type, $isEnabled);
74 $changedStatusTypes[] =
$type;
77 $this->cacheState->persist();
79 return $changedStatusTypes;
88 public function clean(array $types)
90 foreach ($types as
$type) {
91 $this->cacheTypeList->cleanType(
$type);
103 $flushedBackend = [];
104 foreach ($types as
$type) {
105 $backend = $this->pool->get(
$type)->getBackend();
106 if (in_array($backend, $flushedBackend,
true)) {
110 $flushedBackend[] = $backend;
122 foreach ($this->cacheTypeList->getTypes() as
$type) {
134 foreach ($this->cacheTypeList->getTypes() as
$type) {
setEnabled(array $types, $isEnabled)
__construct(TypeListInterface $cacheTypeList, StateInterface $cacheState, Type\FrontendPool $pool)