-
Notifications
You must be signed in to change notification settings - Fork 15
fix: APCu cache condition #703
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
|
Thanks for finding this! if (
($distributedCacheClass === '' && $localCacheClass !== \OC\Memcache\APCu::class)
|| ($distributedCacheClass !== '' && $distributedCacheClass !== \OC\Memcache\APCu::class)
) {
$this->cache = $cacheFactory->createDistributed(Application::APP_ID . '/service');
}For the case when |
Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
49aeab6 to
03cc7a1
Compare
Yes, makes sense. Otherwise we would end up again with APCu as the cache. I updated the PR accordingly. |
|
Now I am wondering, would we need to check Edit: Seems to be fine from a quick glance. In that case the NullCache is assigned, which would return |
oleksandr-nc
left a comment
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.
yep, with the adjusted condition I guess we are fine
|
/backport to stable32 |
|
/backport to stable31 |
|
@SystemKeeper can you please initiate backports? looks like bot ignores me 🤔 |
|
It's not you, the bot is down :-( |
|
/backport to stable32 |
|
/backport to stable31 |
I looked really hard, but to me the condition is wrong. There are 2 cases:
OR
So having:
should be perfectly fine. But from the current code, it is invalid, since
$distributedCacheClass === ''is already false and everything is combined with&&.After changing the code to
||I hit thecreateDistributedline in my local environment correctly.