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

Skip to content

[Config] Race condition and filemtime #13377

Closed
@lisachenko

Description

@lisachenko

Hello, Symfony team!

I want to discuss the behaviour of Config component with checking of file modification time. Currently cache is considered as fresh only when the filemtime of cache is greater than the filemtime of resource.

However, I noticed that for small applications on nice hardware resource creation time and cache creation time can be within one second, so Config component will think that the cache is stale, but this is wrong.

I want to propose to add an additional strictFilemtimeCheck flag for the constructors of resources which will be true by default. When this flag is false, then the check will be not strict and will include an equal sign. Then, developers will be able to decide what to do when filemtime is equal: consider this as stale/fresh cache.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ConfigGood first issueIdeal for your first contribution! (some Symfony experience may be required)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions