-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Added yii\caching\CallbackDependency
to allow using a callback to determine if a cache dependency is still valid
#20137
Conversation
PR Summary
|
…etermine if a cache dependency is still valid
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #20137 +/- ##
=============================================
- Coverage 64.82% 46.70% -18.13%
=============================================
Files 429 446 +17
Lines 37074 43917 +6843
=============================================
- Hits 24034 20510 -3524
- Misses 13040 23407 +10367 ☔ View full report in Codecov by Sentry. |
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.
IMO this needs some documentation how to configure serialization to handle closures - I suspect that most users will try to use this class with anonymous functions, and it won't work by default, because PHP does not handle serializing closures by default and Yii does not do anything to work around this limitation.
@samdark is't possible to merge or is there something else to do? |
Thanks. |
Doesn't CallbackDependency make ExpressionDependency obsolete? |
Using a callback function is more convenient to use than a string, as in
yii\caching\ExpressionDependency
.