magento2: Running bin/magento setup:upgrade re-enables layout, block_html and full_page caches

Preconditions (*)

1.Magento 2.4-develop

Steps to reproduce (*)

  1. Disable the caches by running: bin/magento cache:disable block_html full_page layout
  2. Run: bin/magento setup:upgrade

Expected result (*)

  1. After setup:upgrade completes execution, the block_html, full_page, and layout caches are still disabled

Actual result (*)

  1. An “enabling caches” message appears in the CLI output of setup:upgrade:
Enabling caches:
Current status:
Array
(
    [layout] => 1
    [block_html] => 1
    [full_page] => 1
)
  1. Those caches are re-enabled:
magento235$ bin/magento cache:status
Current status:
                        config: 1
                        layout: 1
                    block_html: 1
                   collections: 1
                    reflection: 1
                        db_ddl: 1
               compiled_config: 1
                           eav: 1
         customer_notification: 1
            config_integration: 1
        config_integration_api: 1
                google_product: 1
                     full_page: 1
             config_webservice: 1
                     translate: 1
                        vertex: 1

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 11
  • Comments: 21 (11 by maintainers)

Most upvoted comments

We’ve just noticed this too. Came here to write a report but you beat me to it @markshust 😃

The desired functionality is that whatever caches are disabled/enabled before running the setup:upgrade command, should be re-applied after running the command. So, the cache statuses should not change whatsoever when running setup:upgrade.

On Sun, May 17, 2020 at 7:22 AM gauravharsh15 notifications@github.com wrote:

Hello @markshust https://github.com/markshust , According to current functionality, three caches(block_html, full_page, layout) are being disabled and then enabled again and if there are no cache disabled from (block_html, full_page, layout) then it disable all caches and enable all caches, please help to suggest the expected behaviour. there must be some reason we are disabling and enabling all caches in Upgrade command.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/magento/magento2/issues/28186#issuecomment-629781370, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADKWJIAQH252LH2VSYAGNLRR7CGFANCNFSM4M55RXAQ .