Skip to content

Changed service causes dependency checks on every request #144

@fmasa

Description

@fmasa

There is a problem with current DIC expiration check.

Cosider following config:

services:
- MyService

Let's say I change content of MyService.php from

<?php
class MyService {}

to

<?php
class MyService
{
    public function foo();
}

(file changed, dependencies didn't)

On next request DependencyChecker compares modification times with meta file of generated container, which differs. Dependency hash is now calculated and matches the one in meta file, so container is considered non-expired.

The problem is that meta file is not updated and hash is calculated on every request, which leads to performance overhead for large containers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions