Skip to content
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

Pimcore page cache cannot be disabled by config if data cache is enabled #5369

Open
pmuskovac opened this issue Dec 3, 2019 · 0 comments · May be fixed by #5448
Open

Pimcore page cache cannot be disabled by config if data cache is enabled #5369

pmuskovac opened this issue Dec 3, 2019 · 0 comments · May be fixed by #5448
Assignees
Labels

Comments

@pmuskovac
Copy link
Contributor

@pmuskovac pmuskovac commented Dec 3, 2019

Tested on Pimcore 6.3.3

Expected behavior

Both caches can be enabled/disabled individually as was possible in Pimcore 5

Actual behavior

The data cache config overwrites the page cache config

Steps to reproduce

pimcore:
    cache:
        enabled: true
        pool_service_id: null
        default_lifetime: 2419200
        pools:
            redis:
                enabled: true
  • under Settings > System Settings > Full Page Cache, disable the cache. This leads to these contents in the system.yml:
pimcore:
    cache:
        enabled: false
        lifetime: null
        exclude_patterns: ''
        exclude_cookie: ''
  • reload Pimcore and open the Full Page Cache settings again, and you will see that the cache is still enabled.

More information

It looks like pimcore is merging all the config structures together, which, using the examples posted above, gives this data structure at lib/Config.php line 101 (getSystemConfiguration()):

pimcore:
    cache:
        enabled: true
        pool_service_id: null
        lifetime: null
        exclude_patterns: ''
        exclude_cookie: ''
        default_lifetime: 2419200
        pools:
            redis:
                enabled: true

containing both cache configurations in one config key, with some values from system.yml overwritten by the values from config.yml

@fashxp fashxp added the Prio-Backlog label Dec 6, 2019
dvesh3 added a commit that referenced this issue Dec 13, 2019
@dvesh3 dvesh3 linked a pull request that will close this issue Dec 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.