-
-
Notifications
You must be signed in to change notification settings - Fork 208
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 cache() return value checks. #386
Conversation
A test case for this would be awesome. |
Roave test failure is unrelated. Might need to look into how to handle fork Actions for Docker workflows. |
I was thinking about that, but don't really know how to.
Any other ideas or preferences? |
@sfadschm I don't think it needs to be that specific. I think ideally we test it bidirectionally:
|
Sounds good! Will add that tomorrow. |
Should the same tests also be added for |
That would be great, both in case of fringe errors but also for coverage. |
Tests are in and should be working. Not sure if they would be more efficient with the I noticed that for the |
Another note: |
I doubt it. There is much about this library not standardized.
We can make this a priority. I've been waiting on the framework one to be done for us to copy but we could make our own. @paulbalandan made me a great base for some modules I could probably adjust for here. |
Curious to see that, too 😆 |
Of course! Check out my toolkit: https://github.com/tattersoftware/codeigniter4-tools/tree/develop Particularly pay attention to the CS Config file in root and src/Standard.php. It uses Paul's Nexus CS Config library, all credit to him for the great work on this. |
Nexus really eases the configuration. |
@sfadschm That's correct. This is something we will look into once the framework rules are complete, applied, and released. |
I see that I'm pinged here. 😄 Sorry, not able to work on remaining fixers as work has been pressing lately. Will be able to start again later this week. @sfadschm yes, @MGatner unrelated to the conversation but I've been seeing you activating |
@MGatner is this one good to merge or are we waiting? |
Yes, this is good to go! |
Closes #334.
cache($key)
always returns the value read from cache ornull
.The old
!cache()
-check will evaluatetrue
for valid but empty cached values, e.g.,[]
, causing unnecessary database calls.