mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-04 17:04:03 +00:00
Fix Redis scan
This commit is contained in:
parent
674f4b3f9a
commit
8eb380df58
1 changed files with 2 additions and 3 deletions
|
|
@ -88,11 +88,10 @@ class RedisStorageDriver implements StorageDriver
|
|||
|
||||
if (config('database.redis.client') === 'phpredis') {
|
||||
$redis_prefix = $this->redis->getOption($this->redis->client()::OPT_PREFIX) ?? $redis_prefix;
|
||||
$all_keys = $this->redis->scan(null, $redis_prefix . 'tenants:*');
|
||||
} else {
|
||||
$all_keys = $this->redis->scan(null, 'MATCH', $redis_prefix . 'tenants:*')[1];
|
||||
}
|
||||
|
||||
$all_keys = $this->redis->keys($redis_prefix . 'tenants:*');
|
||||
|
||||
$hashes = array_map(function ($key) use ($redis_prefix) {
|
||||
// Left strip $redis_prefix from $key
|
||||
return substr($key, strlen($redis_prefix));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue