Skip to content

metadatabag is breaking session laziness #9920

Closed
@cosma

Description

@cosma

Moved from here symfony/symfony#26887


According to https://symfony.com/doc/3.4/reference/configuration/framework.html#metadata-update-threshold the metadata update treshold configuration is not needed anymore because
"Starting in Symfony 3.4, session data is only written when the session data has changed. Previously, you needed to set this option to avoid that behavior."
Unfortunately, this is not quite true in reality used withy the MemcachedSessionHandler which was presented here https://symfony.com/blog/new-in-symfony-3-4-session-improvements.

For consecutive calls with unchanged session, the Memcached adapter is actually using doWrite() instead of updateTimestamp() because, internally , Symfony updates at every http request the metadatabag(the update field is always changed).

So we still need to use the framework.session.metadata_update_threshold configuration to solve our problem.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions