-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Documenting cache fallback #5051
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
Conversation
| configuration would fall back to writing to the ``default`` cache configuration. | ||
| If writing to the ``default`` cache configuration *also* failed in this scenario, the | ||
| engine would fall back once again to the ``NullEngine`` and prevent the application | ||
| from throwing an uncaught exception. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you include a .. versionadded:: 3.5.0 admonition here for folks using older versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yes!
| 'prefix' => 'cake_redis_', | ||
| 'host' => '127.0.0.1', | ||
| 'port' => 6379, | ||
| 'fallback' => 'default', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious. What happens if one configures the same engine as fallback (e.g. by accident)? Do we have a clear exception for that? Something like "You are trying to configure the engine itself as its fallback"...
This would be a hard misconfiguration, something that SHOULD throw an exception, IMHO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's pretty much exactly the exception it throws 😄 I did that exact thing while writing this haha
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahahaha, beautiful! 😆
Since engines now default to falling back to the
NullEngine, I felt it important to document in the Behavior Changes section of the migration docs.