Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Cache warmers are not run after clearing the cache in some scenarios #59445

Closed
@javiereguiluz

Description

@javiereguiluz

Symfony version(s) affected

All

Description

When the cache dirs don't exist (rm -fr var/cache/*) if you run the command bin/console cache:clear, Symfony runs cache warmers first and then deletes the entire cache (removing all the data created in the cache warmers).

If the cache dirs exist, Symfony does the right thing: first it clears the cache and then it runs the cache warmers.

Note: this is not a theoretical edge-case; this is impacting in real-world (see e.g. EasyCorp/EasyAdminBundle#6680)

How to reproduce

I created a small reproducer: https://github.com/javiereguiluz/reproducer

All the details are in the README

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions