Skip to content

Separate cache_types from app/etc/config.php #32605

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 2.5-develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/internal/Magento/Framework/App/Cache/State.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public function setEnabled($cacheType, $isEnabled)
public function persist()
{
$this->load();
$this->writer->saveConfig([ConfigFilePool::APP_ENV => [self::CACHE_KEY => $this->statuses]]);
$this->writer->saveConfig([ConfigFilePool::APP_CACHE => [self::CACHE_KEY => $this->statuses]]);
}

/**
Expand Down
2 changes: 2 additions & 0 deletions lib/internal/Magento/Framework/Config/File/ConfigFilePool.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
*/
class ConfigFilePool
{
const APP_CACHE = 'app_cache';
const APP_CONFIG = 'app_config';
const APP_ENV = 'app_env';

Expand All @@ -32,6 +33,7 @@ class ConfigFilePool
* @var array
*/
private $applicationConfigFiles = [
self::APP_CACHE => 'cache.php',
self::APP_CONFIG => 'config.php',
self::APP_ENV => 'env.php',
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ protected function setUp(): void
public function testGetPaths()
{
$expected['new_key'] = 'new_config.php';
$expected[ConfigFilePool::APP_CACHE] = 'cache.php';
$expected[ConfigFilePool::APP_CONFIG] = 'config.php';
$expected[ConfigFilePool::APP_ENV] = 'env.php';

Expand Down