Skip to content
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

[Cache] skip APCu in chains when the backend is disabled #36555

Merged
merged 1 commit into from Apr 24, 2020

Conversation

nicolas-grekas
Copy link
Member

Q A
Branch? 3.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #34962
License MIT
Doc PR -

I think this should do it.

Copy link
Member

@Nyholm Nyholm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is a hack. A useful hack and most likely exactly what you want. But still.

We don’t do the same thing if the Redis extension (or Redis lib) is missing.

@nicolas-grekas
Copy link
Member Author

nicolas-grekas commented Apr 24, 2020

The difference is that the availability of the redis backend doesn't vary by runtime.
That's the best I can think of. There must be some runtime code that deals with the situation. Configuration only cannot do anything for us here (for redis it can.)

Copy link
Member

@Nyholm Nyholm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nicolas-grekas: I said Redis extension/lib not backend.

I get the argument that this is the only difference between CLI/HTTP. If the Redis extension was missing it would be missing on all runtimes.

👍

@nicolas-grekas
Copy link
Member Author

I said Redis extension/lib not backend.

and I wrote "backend" to mean "extension" :D

The alternative would be to make the ApcuAdapter NOT throw any warning when it's not enabled and on the CLI. But as you explained in one of the issues, there should be some reporting when ApcuAdapter is used directly and it doesn't work at all. In a chain, we can relax this rule - that's what this PR proposes.

Thanks for approving :)

@fabpot
Copy link
Member

fabpot commented Apr 24, 2020

Thank you @nicolas-grekas.

@fabpot fabpot merged commit 259f523 into symfony:3.4 Apr 24, 2020
This was referenced Apr 28, 2020
@nicolas-grekas nicolas-grekas deleted the cache-skip-apcu-in-chain branch May 4, 2020 08:04
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.

None yet

5 participants