Results 1 to 3 of 3

Thread: [4.10] Packages are ignored after clearing cache

  1. #1
    User
    Join Date
    11-16-11.
    Location
    Hamburg
    Posts
    39

    Default [4.10] Packages are ignored after clearing cache

    Contao 4.10.4, dev environment.

    After executing console cache:clear, if I run console contao:migrate, it tries to DROP everything from the database, related to the installed extensions, that was not in the original contao/managed-edition/composer.json. In frontend or backend, I either get errors, or those extensions just missing completely, so basically their dca and configs are being ignored.

    This doesn't happen when running either console cache:clear --no-warmup && console cache:warmup or post-install-cmd. In fact, running either of them fixes the broken cache.

    It is probably just something wrong on my side and not a bug, which is why I am not opening an issue on Github. I just need help - which way to dig?

  2. #2
    User Spooky's Avatar
    Join Date
    01-03-13.
    Posts
    339

    Default

    It is generally not recommended to run cache:clear without the --no-warmup parameter, as cache:clear will also do a warmup after clearing the cache. But clearing and warming the cache within the same process might lead to issues. Other than the general recommendation not to do it this way there exists a known problem in regards to old Contao 3 style extensions, when running cache:clear without --no-warmup.

    So you should always use:

    Code:
    cache:clear --no-warmup
    cache:warmup
    Or better yet, simply remember these commands:

    Dev Environment:

    Code:
    composer install
    Production Environment:

    Code:
    composer install -o --prefer-dist --no-dev

    When running composer install, composer will also execute Contao's Script Handler (if you are using the default composer.json of the Contao Managed Edition), which will then execute the correct commands.

  3. #3
    User
    Join Date
    11-16-11.
    Location
    Hamburg
    Posts
    39

    Default

    Yes, I know those composer commands, but it's an overkill sometimes, e.g. after only changing some translations or palettes config.

    But clearing and warming the cache within the same process might lead to issues.
    This is the piece of information that I needed. Thank you, Spooky!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •