Skip to content

[Cache] Add a note about the change in the default cache namespace generation to the upgrade guide #57302

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 11, 2024

Conversation

mbabker
Copy link
Contributor

@mbabker mbabker commented Jun 3, 2024

Q A
Branch? 7.1
Bug fix? no
New feature? no
Deprecations? no
Issues N/A
License MIT

After deploying the Symfony 7.1 upgrade for a client, we immediately noticed a high rate of cache misses for one of our heavily used controller actions. Digging through the changes for the relevant upstream packages, it looks like this was introduced by way of #52948 and changing the algorithm used for the default cache namespaces when a namespace attribute isn't configured on the cache.pool service tag.

To my knowledge, there is no way to configure a namespace for cache pools using the framework.cache configuration, so through the framework configuration, there is no way to avoid hitting this issue without either manually building cache services or getting creative with a compiler pass that runs before the core CachePoolPass, so IMO it's best to call out the change in the upgrade guide.

@nicolas-grekas
Copy link
Member

I wouldn't describe this as a BC break. We consider that a minor update isn't required to not invalidate caches (but we'd prefer when possible). Here, it's too late for reverting IMHO.
Can you also add a note in the UPGRADE file at the root of the repo? (and remove the "BC Break" prefix)

@mbabker mbabker force-pushed the 7.1-bc-cache-namespace branch from c652caf to f536f3c Compare June 11, 2024 13:33
@mbabker mbabker changed the title [Cache] Note a breaking change in the cache namespace generation in CachePoolPass [Cache] Add a note about the change in the default cache namespace generation to the upgrade guide Jun 11, 2024
@mbabker
Copy link
Contributor Author

mbabker commented Jun 11, 2024

PR updated

@fabpot
Copy link
Member

fabpot commented Jun 11, 2024

Thank you @mbabker.

@fabpot fabpot merged commit 954dfa7 into symfony:7.1 Jun 11, 2024
9 of 10 checks passed
@mbabker mbabker deleted the 7.1-bc-cache-namespace branch June 11, 2024 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants