-
Notifications
You must be signed in to change notification settings - Fork 10.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
Can't flush tags on Redis cluster cache in Laravel 5.1.30 and later #17713
Comments
Update: the issue was introduced with the |
You are seeing a Predis exception. I'm not sure there is much we can do about it? Perhaps asks on their repository? |
Same thing with |
@taylorotwell yes, it is a Predis exception and it would be a good idea to ask in their repository, after have reproduced the behaviour directly on it. But, updating Laravel from 5.1.20 to 5.1.45 didn't affect Predis package version: it still remains v1.1.1. |
This issue should be tagged for any version of Laravel because of wrong definition of tags into Refer to this #17792 (comment) for more informations, and this about what could be changed: https://github.com/laravel/framework/pull/17792/files. |
Your updated #17792 PR that uses hash tags looks good to me. If it doesn't get merged into 5.1, I'd at least submit it for 5.4. |
Is this moving forward? |
Still no fix or workaround for this bug? |
So it seems like this bug is the same as the one I posted (#22788). Does anybody could take a look? @taylorotwell @themsaid |
I'd suggest to submit a PR for v5.6. |
Will do that once I have some time. I'm not really familiar with the code base. |
Had the issue too. Have the same app on a redis 3.2.8 don't reproduce the error. |
Any update on this? Getting similar error wthile trying to flush a tag. Also using Redis Clusters. |
@mattmant I wonder how this still isn't merged :( I'm on 5.6 btw and have the same issue. |
This is not a pull request. There's nothing to merge? |
Okay sorry for not using 100% accurate verbiage @GrahamCampbell , but in the end this still doesn't work in 5.6 and cannot flush tagged cache with redis cluster. |
We're open to pull requests to fix this. |
That's what I meant, there was one a year ago for 5.1 https://github.com/laravel/framework/pull/17792/files ;) |
Taylor mentioned on that pull request, that something similar may be considered for master. Maybe someone just needs to PR it? |
Yeah, just send a PR to v5.7. |
I haven't found a solution but maybe a way around it for some cases. In my case I was tagging single posts with this tag:
Somehow the bug didn't occurred all the time. Within some methods the foreach worked properly. Only in one method it failed. I found a solution by adding this tag
and I can clear the cache for those posts with: |
Any update on this? Running into the same issue. |
Can anyone confirm this is occuring on Laravel 5.7 (or 5.5)? Would be good to know if any of the recent updates fixed this? |
same error :-( |
Same problem, anyone any idea?? @taylorotwell |
So, how to use tags with this bug? any way around it? |
use phpredis instead of predis if you want to go around it |
Any updates on this issue? |
This is still an issue with Memcached.. |
@Jafo232 we're welcoming prs to help solve this. |
It's still an issue because nobody has fixed it. Simple as that. 😄 Anyone can fix it by making a PR to the framework. |
I have confirmed this is working on a Redis cluster I provisioned on ScaleGrid.io and using the |
I have the issue with memcached too. edit : so I switched to redis (using php-redis) and it works fine... Maybe memcached should not be authorized to use tags, as it is the case for file or database. |
@taylorotwell As I have suggested three years ago, I'm still using the following solution, without any side effects on performance/data: https://github.com/laravel/framework/pull/17792/files It is not a BC as you said here #17792 (comment). It is a simply way to tell to predis how to manage associative keys. Redis keys and the way they are defined/stored will not be changed. For more information: |
Description:
I updated Laravel from version 5.1.20 to version 5.1.45. I'm using cache Redis with tags to store some informations. The application is running on 3 web-servers and Redis is in cluster mode.
After the update I can't flush tags saved in Redis because I get the following error:
The important thing is that before updating Laravel the application was stable and was working well.
I saw that there was many important changes into
Illuminate\Cache\RedisTaggedCache
with the introduction of$this->deleteStandardKeys();
into theflush()
method.Steps To Reproduce:
You can test the behavior in your local machine with a single Redis node (the same happens if you have a real Redis cluster also).
'cluster' => true
in your Redis config inconfig/database.php
. For example:Cache::store( "redis" )->tags( "tag" )->flush();
You will get the following red message:
Predis\NotSupportedException with message 'Cannot use 'DEL' with redis-cluster.'
The text was updated successfully, but these errors were encountered: