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

Skip to content

[Cache] [BC] cache namespace changed after minor update #57366

Closed as not planned
@eminjk

Description

@eminjk

Symfony version(s) affected

7.1.0

Description

In my project, multiple instances are connected to the same cache server (Redis) and share the same data under the same namespace due to framework.cache.prefix_seed config.

During the execution of canary deployments, mostly related to transition to Symfony 7.1, it was observed that new instances completely missed the cache. Upon inspection of Redis, an additional set of keys containing different prefix (namespace) was identified.

This issue appears to have been introduced in #52948.

src/Symfony/Component/Cache/DependencyInjection/CachePoolPass.php

There is also PR related to this matter (#57302), but I believe that note about BC might not be enough keeping in mind the Backward Compatibility Promise.

How to reproduce

store the cache using symfony/cache 7.0 and try to retrieve it using 7.1

Possible Solution

revert the previous hash algorithm or introduce the possibility to force cache namespace through the configuration

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions