-
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
cache:prune-stale-tags Not Functioning on Redis Cluster #50415
Comments
Thank you for reporting this issue! As Laravel is an open source project, we rely on the community to help us diagnose and fix issues as it is not possible to research and fix every issue reported to us via GitHub. If possible, please make a pull request fixing the issue you have described, along with corresponding tests. All pull requests are promptly reviewed by the Laravel team. Thank you! |
Please see https://laravel.com/docs/10.x/upgrade#redis-cache-tags
|
OMG. I got it. But I have confirmed that I checked the page before selecting Laravel 10 and the Cache server. Did the Laravel maintainer change the supported driver in a minor update? Changes like this should only be made in a major update... |
Even the whole section about "Cache Tags" is gone in the Laravel 10 documentation... |
Laravel Version
10.38.2
PHP Version
8.2.16 (Docker, php-fpm)
Database Driver & Version
PhpRedis and Redis 7.0.7 on AWS ElastiCache (Redis Cluster)
Description
The
php artisan cache:prune-stale-tags
command does not function on a Redis Cluster. I have verified that this command works with Redis. However, when executed on a Redis cluster, no memory is freed, as illustrated in the chart below.(The command was executed every hour. The areas that have decreased are those that I have manually addressed.)
I suspect there may be issues with both Laravel and possibly PhpRedis.
I addressed this by implementing the following measures in the code:
RedisStore::currentTags()
andPhpRedisConnection::scan()
SCAN
command on each node in the Redis Cluster.RedisTagSet::flushStaleEntries()
pipeline()
.I was unable to successfully integrate this into the framework code. I hope this issue can be resolved.
Steps To Reproduce
php artisan cache:prune-stale-tags
.The text was updated successfully, but these errors were encountered: