- PHP 8.1 ~ 8.3
- Laravel 10 ~ 11
- ext-redis 5.3 ~ 6.0 (Test covered)
- Redis 6 ~ 7 (Test covered)
Use Composer for install.
composer require 104lab/laravel-redis
Redis KEYS
method is like full-table scan, so maybe use SCAN
is good idea.
$connection = Redis::connection();
# Before
$keys = $connection->keys('foo:*');
# After
$keys = (new KeysByScan($connection))('foo:*');
# Use chunk limit
$keys = (new KeysByScan($connection))('foo:*', 100);
The MIT License (MIT). Please see License File for more information.