-
Notifications
You must be signed in to change notification settings - Fork 141
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
fix: CacheBridgeAbstract::save()
not assigning value to cache when cache hit mises
#434
Conversation
Signed-off-by: Sergey Mutaf <[email protected]>
@evansims can you check it, please? |
@seruymt I am currently tasked on other priorities right now, but will review as soon as I'm able. Thanks for your contribution. |
CacheBridgeAbstract::save()
not assigning value to cache when cache hit mises
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #434 +/- ##
===========================================
Coverage 100.00% 100.00%
Complexity 523 523
===========================================
Files 31 31
Lines 1294 1294
===========================================
Hits 1294 1294
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ 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.
Hi @seruymt 👋 Thanks for your contribution. I've updated the test suite to pass with the changes.
Changes
This PR updates cache save value.
According to the Auth0\Laravel\Bridges\CacheItemBridgeAbstract::get(), the item value always returns null because
isHit()
is false til the value is cached, and as a result, the cache is not working properly.So for cache save function, we need to use
getRawValue(),
which is not dependent on hit status.References
Testing
Contributor Checklist