Closed ktanakaj closed 5 months ago
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
Usage of Cache::tags() is only recommended for applications using Memcached. If you are using Redis as your application's cache driver, you should consider moving to Memcached or using an alternative solution.
OMG. I got it. But I have confirmed that I checked the page before selecting Laravel 10 and the Cache server. https://web.archive.org/web/20230428092634/https://laravel.com/docs/10.x/upgrade#redis-cache-tags
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
(The command was executed every hour. The areas that have decreased are those that I have manually addressed.)
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.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
.