Skip to content

[Cache] Throw ValueError in debug mode when serialization fails #43148

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
Sep 24, 2021

Conversation

nicolas-grekas
Copy link
Member

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

This feature allows spotting mistakes at the dev stage when trying to store unserializable objects (typically a closure) into a cache.

This PR replaces #42241 with a simpler and more focused approach: here we fail via a simple ValueError, which won't get caught by any try/catch into the Cache component, and we fail only when serialization fails - not on any failures of cache pool methods.

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.

In debug mode, the cache component could throw when save() fails
3 participants