-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
[5.4] insist on not considering false as cache miss #17476
Conversation
Just keeping this on 5.4 is probably fine. |
This needs to be reverted. @taylorotwell: Not checking for If you want to allow |
Sigh. All this stuff is driving me batty :| |
@tillkruss I don't get it! Sounds like you wrong! Please take a look at changes in RedisStore::get() and RedisStore::unserialize() first! |
@halaei Did you test your PR against |
@tillkruss Ok. The communication between us is a little bit messed up, and I am really confused. |
PhpRedis returns |
protected function unserialize($value)
{
if (! is_null($value) && $value !== false) {
return is_numeric($value) ? $value : unserialize($value);
}
} This was the trick! |
@tillkruss tests pass under phpredis |
Can you test it manually, I'm not sure if we have a test case for that yet. |
I think you mean RedisCacheIntegrationTest::testRedisCacheAddTwice()` for example. That passes when I change InteractsWithRedis to use phpredis instead of predis. :( My RIP PR is reverted by mistake ;) |
You're right. However it's nicer to solve this on the driver level with #17196. |
Thanks. That will be nice to remove the limitation and make upgrade safer
and easier one way or the other. Please also take a look at the changes I
made to RedisStore::unserialize() and the calls to it. Maybe you can add
that to your PR as well if you find it helpful.
|
That's not gonna be necessary anymore. |
I also note a minor bug: there is a difference in the way values are unserialized in RedisStore::get() and RedisStore::many().
This PR also fix that. I think I should send another PR for laravel 5.1 with the related tests if you give me a day.