The caching facade in Laravel doesn't seem to allow you to get all keys currently cached in Redis.
I want to create an endpoint so that I can retrieve this information and know if my entries are working properly.
I tried using the Redis facade without success using the following commands and their respective errors
Redis::keys("*"); "Cannot use 'KEYS' with redis-cluster." Redis::scan("cursor"); "Cannot use 'SCAN' with redis-cluster."
In Redis and cluster, if you have many keys, it is recommended to scan instead of keys. However, you should use it correctly. Try this approach.
refer to: Laravel and redis scanning